nwalke
nwalke

Reputation: 3209

htaccess redirect for _escaped_fragment_=

I'm trying to remove the _escaped_fragment_= that Google uses when it encounters a link with a # in it. The Rewrite I'm trying to use is as follows:

RewriteRule ^(.*?)_escaped_fragment_=(.*)$ $1$2 [L]

This works when I try to use an online htaccess checker like http://htaccess.madewithlove.be/, but not when served through Apache.

Example, if I try to visit site.com/_escaped_fragment_=pagename, there is no redirection.

Upvotes: 1

Views: 941

Answers (1)

anubhava
anubhava

Reputation: 785038

Probably you need R flag also. Try this rule:

RewriteEngine on
RewriteRule ^(.*?)_escaped_fragment_=(.*)$ /$1$2 [L,NC,R]

Upvotes: 2

Related Questions