Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Hide/changing .php?=


g1smd - 10:56 am on Nov 5, 2012 (gmt 0)


The redirect target should contain the canonical protocol and hostname.
In the rule that redirects, the
/book/%1? part should be http://www.example.com/book/%1?


Leave a blank line after every RewriteRule to make the code easier to read.
That's after each Rule, not after each Condition.


Directly after your "specific" redirect, and before the internal rewrite, you need to add the "general" non-www/www canonicalisation redirect.
After the redirecting ruleset and before the rewriting ruleset add:

RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]


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