Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- 301 redirect best practice


phranque - 1:50 pm on Sep 6, 2012 (gmt 0)


what was the corresponding error message from the server error log for that 500 internal server error?

you should do all the canonicalization in one hop - doing the domain canonicalization in one step and further canonicalization in a subsequent step is not ideal.


RewriteCond %{HTTP_HOST} ^example.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.example.net$


this would be better replaced by a single test:
RewriteCond %{HTTP_HOST} !^www.example.com$

the RewriteRule that follows should have a begin anchor on the pattern.


Thread source:: http://www.webmasterworld.com/apache/4491893.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com