Take the 2-minute tour ×

Anyone know why my homepage wont load with the www prefix.

Links such as


will load fine



returns a 404.

Everypage works including the home page if I leave out the www. The site has cms made simple in the backend and has a root_url set without the www. The dns has a cname to the www too.

As Requested here is the htaccess

RewriteEngine On

RewriteRule ^gallery(/((([a-zA-Z0-9-]+)(/(\d+))?)/?)?)?$ index.php?page=77&groupId=$4&showpage=$6 [NC,QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [NC,QSA,L]


share|improve this question

migrated from stackoverflow.com Nov 8 '11 at 22:21

This question came from our site for professional and enthusiast programmers.

Can you post the contents of your .htaccess? Otherwise it's entirely speculation... –  ianhales Oct 14 '11 at 15:27
added it in the question thanks. –  jiraiya Oct 14 '11 at 15:31
Could this be it?: "...has a root_url set without the www" –  Sparky Oct 14 '11 at 15:32
It depends on the 404 generated. If it's handled by the CMS and outputted accordingly, then that's a likely possibility. If it's a raw server 404, then the CMS settings shouldn't make any difference. –  ianhales Oct 14 '11 at 15:36
@jiraiya, you should post the final outcome as an answer and accept your own answer. –  Sparky Nov 8 '11 at 4:02
show 4 more comments

1 Answer

Might it be the fact that you have a last rewrite flag on the first rule? I would remove the L from [NC, QSA, L].


I believe the L flag will stop the rules below from being parsed, may be wrong though? We have any .htaccess wiz's out there?

share|improve this answer
That rule would only apply to gallery pages, and the L flag only stops mod_rewrite if the rule matches. So it's not the problem. The problem was a DNS propagation error as specified in the comments. The OP just chose not to post that solution and accept it as an answer. –  Lèse majesté Dec 8 '11 at 23:06
add comment

Your Answer

