Note that there are some explanatory texts on larger screens.

plurals
  1. POApache mod_rewriting not finding any files
    primarykey
    data
    text
    <p>OK, so we have a specific set of rewrites that we use on a number of sites due the file structure of our programming. It's never been a problem before until now.</p> <p>For example, the rewrite:</p> <pre><code>RewriteRule ^$ Pages/news.php </code></pre> <p>Instead of directing to <code>http://www.domain.com/wedding-venues-and-caterers-news/Pages/news.php</code> it is redirecting to <code>/path/to/file/public/wedding-venues-and-caterers-news/Pages/news.php</code> and it's 404-ing (<code>/path/to/file</code> being the actual path).</p> <p>If anyone could shed any light as to why this is happening, or point me in the right direction then I would be eternally grateful.</p> <p>I am running all of my script and files in a subfolder, there is another .htaccess file in the root folder which I have edited in at the bottom but it doesn't seem to contain anything that could be interfering. </p> <p>If you require any further information on the server then let me know!</p> <hr> <p>EDIT - Here are all my rewrites as requested.</p> <pre><code>Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteRule ^$ Pages/news.php RewriteRule ^images/([0-9]+)/([0-9]+)/(0|1)/(.*).jpg?$ Classes/Image/timthumb.php?src=http://www.domain.com/wedding-venues-and-caterers-news/images/$4.jpg&amp;h=$1&amp;w=$2&amp;zc=$3 RewriteRule ^([A-Za-z0-9\-]+)/([0-9]+)/([0-9]+)(/)?$ Pages/archives.php?cat_id=$2&amp;page=$3 [NC,L] RewriteRule ^archives/mon/([0-9]+)/yr/([0-9]+)/([0-9]+)$ Pages/archives.php?mon=$1&amp;yr=$2&amp;page=$3 [NC,L] RewriteRule ^([A-Za-z0-9\-]+)/([0-9]+)(/)?$ Pages/archives.php?cat_id=$2 [NC,L] RewriteRule ^archives/mon/([0-9]+)/yr/([0-9]+)(/)?$ Pages/archives.php?mon=$1&amp;yr=$2 [NC,L] RewriteRule ^([A-Za-z0-9\-]+)/([A-Za-z0-9\-]+)/([0-9]+)(/)?$ Pages/article.php?art_id=$3 [NC,L] RewriteRule ^wedding-venues-catering-rss(/)?$ rss/rss.php [NC,L] RewriteRule ^Page-Error(/)?$ Pages/errorPage.php [NC,L] ErrorDocument 404 http://www.domain.com/wedding-venues-and-caterers-news/Page-Error ErrorDocument 401 http://www.domain.com/wedding-venues-and-caterers-news/Page-Error ErrorDocument 403 http://www.domain.com/wedding-venues-and-caterers-news/Page-Error ErrorDocument 404 http://www.domain.com/wedding-venues-and-caterers-news/Page-Error ErrorDocument 500 http://www.domain.com/wedding-venues-and-caterers-news/Page-Error </code></pre> <hr> <p>I also tried to reference the rewrites with absolute URL's, this worked of course, but they were just redirecting instead of rewriting as you might expect.</p> <hr> <p>EDIT - This is the other .htaccess file in the root directory, which is part of their existing site.</p> <pre><code>#Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^domain.com [nc] rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] &lt;IfModule mod_rewrite.c&gt; RewriteEngine on redirect 301 /Cavendish.htm http://www.domain.com/ redirect 301 /grange.htm http://www.domain.com/ redirect 301 /restaurant/index.html http://www.domain.com/ redirect 301 /news/Save-money-by-booking-wedding-venues-in-Middlesex-at-off-peak-times.asp http://www.domain.com/ redirect 301 /news/default.asp http://www.domain.com/ </code></pre> <p> </p> <hr> <p>EDIT - I thought this might be relevant.</p> <p>The 404 error on the rewrite shows this path -</p> <pre><code> /l/i/domain.com/public/wedding-venues-and-caterers-news/Pages/news.php </code></pre> <p>But.. if I edit news.php and request SCRIPT_FILENAME it gives me the path..</p> <pre><code> /services/webpages/l/i/domain.com/public/wedding-venues-and-caterers-news/Pages/news.php </code></pre> <p>My guess is that something is affecting the default path.</p> <p>Furthermore I have tried basic rewrites at root level, but these also 404.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload