cancel
Showing results for 
Search instead for 
Did you mean: 

Unexplained mod_rewrite errors

DannyL
Member

Hello guys,

 

So.. where to begin.

 

I am working on a site for a client that is hoted with BT Business, so I thought this might be the best place to ask.

 

I have used these rewrite rules numerous times before and numerous occasions and never had any issues. The site is working fine with the rewrites on our development server, but as soon as it was uploaded on the BT Business server the rewrites don't work.

 

Mod_rewrite is enabled. I am working within a subdirectory. Their is a .htaccess file in the root directory but it has very basic rules in there (a few redirects and 1 rewrite to force www.) and it is not interfering with mine. Furthermore, I've tried a very basic rewrite in their (Ie. rewrite a.html to b.html) and the same error occurs.

 

I recieve a 404 error for every rewrite and I have a sneaking suspicion it's something to do with the paths. 

 

The 404 page says this page is not available : -

 

/l/i/domain.com/public/wedding-venues-and-caterers-news/Pages/news.php

 

but if I browse to news.php directly and echo the path - the path is: -

 

/services/webpages/l/i/domain.com/public/wedding-venues-and-caterers-news/Pages/news.php

 

And just incase anyone wants to see my .htaccess (even though i'm 99.9% sure it's a server issue) : -

 

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

 

If anyone can help solve this I will be more than eternally grateful; as I type this I am debating launching computer out of office window.

 

Thank you guys,

Danny

0 REPLIES 0