weird mod rewrite issue

Using a single web hosting account to host multiple sites

weird mod rewrite issue

Postby stargazinc » Thu Mar 22, 2007 11:22 am

this is what I got

I just transfered over to a new host, the mod rewrite on the old host worked fine. Everything was transfered over. This is the problem I come across some pages that use the mod rewrite go to the correct page but nothing on the screen loads. Then I try it without the www in the url address then the page loads fine. My theory is that it needs something in the mod rewrite that deals with the www. Its on a dedicated server that have other domains on them
RewriteEngine On, this the mod I have its for my domain freegamesclip.com, you can see whats up. Stumped on this one. Any help would be greatly appreciated.

RewriteRule ^admin/([a-z0-9]+)\.([a-z0-9]+)$ admin/index.php?mod=$1&sub=$2 [QSA,L]
RewriteRule ^(external|images|thumbs)/(.+)$ $1/$2 [QSA,L]
RewriteRule ^([a-z0-9]+)$ index.php?mod=$1 [QSA]
RewriteRule ^([a-z0-9]+)/([\sA-Za-z0-9_-]+)$ index.php?mod=$1&sub=$2 [QSA]
RewriteRule ^profile/([\s\.A-Za-z0-9_-]+)$ index.php?mod=profile&sub=$1 [QSA]
stargazinc
 
Posts: 18
Joined: Wed Jul 26, 2006 11:22 am

Postby richardk » Thu Mar 22, 2007 1:31 pm

Having www won't make a difference to that, it's more likely to be a configuration issue. Are they using the same <VirtualHost>? Is AllowOverride set to All in the <Directory> for your document root? Does the Options directive in the <Directory> have FollowSymLinks set?

Does any mod_rewrite work with and without the www?

You could try forcing the www
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

RewriteRule ^admin/([a-z0-9]+)\.([a-z0-9]+)$ /admin/index.php?mod=$1&sub=$2 [QSA,L]
RewriteRule ^(external|images|thumbs)/.+$    -                                  [L]
RewriteRule ^([a-z0-9]+)$                    /index.php?mod=$1              [QSA,L]
RewriteRule ^([a-z0-9]+)/([\sA-Za-z0-9_-]+)$ /index.php?mod=$1&sub=$2       [QSA,L]
RewriteRule ^profile/([\s\.A-Za-z0-9_-]+)$   /index.php?mod=profile&sub=$1  [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 55 guests

cron