Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Canonicalization: best code to redirect no-www to www & index to /


g1smd - 10:19 pm on Oct 15, 2012 (gmt 0)


Do you get requests for
index.php4 or for index.php5 ever? If so, include those as options using [45]? here.

If you omit the hostname from the rule target of the redirect some requests will trigger an unwanted multiple step redirection chain.

Each rule shouldn't fix just one issue, it must fix multiple issues...

First rule: redirect index requests but make sure the user ends up on www. in this rule not in a second redirect.

Second rule: redirect requests to www.example.com when original request wasn't for "exactly" that hostname.

The
[L] flag stops rule processing once "this" rule matches. Every rule should have this flag.


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