By troelsfeodor on
Hi,
I have just noticed that while my frontpage is set up to redirect without-www to www, all the subpages doesn't do this! I thought the developers had made sure of this a long time ago.
So here is what I found in .htaccess:
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteRule ^/?$ "http\:\/\/www\.domain\.com" [R=301,L]
I guess I have to change it so it will redirect all subpages too (e.g. domain.com/blog should redirect to www.domain.com/blog).
Please help
Comments
What you wrote isn't correct,
What you wrote isn't correct, you have a typo in it:
Use this:
You have a quote after your .com. You also don't have the (.*)
I'm not sure how you could have found that messed up code in the standard drupal 6.x .htaccess file? Perhaps you were looking in the wrong folder. Be sure you only download your drupal from this site here.
Thanks. I now used the
Thanks.
I now used the version you suggested and it does redirect showto www now, but a new problem arose. When I go to a subpage without using www it will redirect me to this path http://www.example.com/index.php?q=page instead of the existing clean url.
I am using the global redirect module if that has anything to do with it.
Alright I figured it out.
Alright I figured it out. This new problem existed because I had placed the rewrite rule at the very bottom of the .htaccess file, thus after the rewrite rule which ensured clean urls.
So I moved up to its default position and it worked.
Cool!
Cool!