OK, so there exists a specific group of rewrites that people experience numerous sites due the file structure in our programming. It's rarely been an issue before so far.

For instance, the rewrite:

RewriteRule ^$ Pages/news.php 

Rather than pointing to http://www.domain.com/wedding-venues-and-caterers-news/Pages/news.php it's redirecting to /path/to/file/public/wedding-venues-and-caterers-news/Pages/news.php and it is 404-ing (/path/to/file being the particular path).

If anybody could shed any light why this really is happening, or point me within the right direction i quickly could be forever grateful.

I'm running all my script and files inside a subfolder, there's another .htaccess file within the root folder which i've edited in at the end however it does not appear to contain anything that may be interfering.

Should you require any more info on the server then tell me!

EDIT - Listed here are my rewrites as asked for.

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&h=$1&w=$2&zc=$3
RewriteRule ^([A-Za-z0-9\-]+)/([0-9]+)/([0-9]+)(/)?$ Pages/archives.php?cat_id=$2&page=$3 [NC,L]
RewriteRule ^archives/mon/([0-9]+)/yr/([0-9]+)/([0-9]+)$ Pages/archives.php?mon=$1&yr=$2&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&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

I additionally attempted to reference the rewrites with absolute URL's, this labored obviously, however they were just redirecting rather than spinning as you may expect.

EDIT - This is actually the other .htaccess file within the root directory, that is a part of their existing site.

#Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] 

<IfModule mod_rewrite.c>
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/

EDIT - I figured this can be relevant.

The 404 error around the rewrite shows this path -


But.. basically edit news.php and ask for SCRIPT_FILENAME it provides me with the road..


My prediction is the fact that something has effects on the default path.

In addition I've attempted fundamental rewrites at root level, however these also 404.

Finally the problem continues to be solved.

Because the server is located with BT Business I made the decision to send them an email to ascertain if they might help.

A man responded saying he'd drenched to the server and modified the .htaccess also it now works fine.

He simply added the subfolder while watching rewritten URL's.


RewriteRule ^$ Pages/news.php  

Grew to become: -

RewriteRule ^$ wedding-venues-and-caterers-news/Pages/news.php

I'm still unsure why the subdirectory is required once the .htaccess file is within that directory, my prediction could it be is one thing related to their server configurations.