Customizing SMF > Building Your Community and other Forum Advice
problem with domain root to www redirection
(1/1)
Sono:
When I had my forum checked by an online Seo analyzer, it reported that the root domain is reditected only temporarily to the www domain. So I added this code to the beginning of the .htaccess (I have Pretty URL mod installed, that's why I decided to put this to the beginning of the file):
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Now the redirections works well between the root and www, but is it enough to add this code? As the analyzer detected a temporary redirection before, shouldn't I delete the code for that? If yes, where can I find that?
I use SMF 2.0.2 anyway.
Navigation
[0] Message Index
Go to full version