Comment on 301 Redirect Htaccess by James.
Hi
Thank you for your great article, which is one of the most helpful article I found so far on mod_rewrite. At the moment I have following code to redirect from non-www to www.
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
It works totally fine for home page but not for other deep links, such as http://domain.com/city/Sydney.php, they are still going to non-www pages. What’s the best approach I could use to solve it?
Many Thanks in advance
James