[Techtalk] Moving Websites: 301 Redirect
sheila at shefen.com
Sun Jun 6 20:40:40 UTC 2010
Gayathri Swaminathan wrote:
> Clicking on an anchor like #artsec is handled by the browser. They don't
>>> result in a request being send back to the server, so your RewriteRule
>>> will never be invoked.
> Appears from reading Flags, with [NE] flag available within mod_rewrite,
> anchors could be detected (
> Testing it out to see if the theory applies. Will share findings.
That's not for detecting anchors but allows rewrites *too* anchors. This
it the opposite of what Sue is trying to accomplish.
The example they give:
RewriteRule ^/anchor/(.+) /bigpage.html#$1 [NE,R]
The above example will redirect /anchor/xyz to /bigpage.html#xyz
Using [NE] keeps the # character from being converted to hex before
being sent to the browser. It's still up to the browser to detect and
interpret the anchor.
More information about the Techtalk