SupaMonkey
SupaMonkey

Reputation: 884

URL Rewrite with Special Character

I have an incoming link to my site that is 'incorrect' and I cannot get the incoming link changed so I am having to make a redirect rule for it.

The link points to: mydomain.tld/search_engin%3C/td

I have tried:

RewriteRule ^/search_engin%3C/td$ http://www.osirion.co.za/search_engine_marketing_optimisation/1-about_our_search_engine_marketing_services.htm [NE,R=301,L]

RewriteRule ^/search_engin%3C/td$ http://www.osirion.co.za/search_engine_marketing_optimisation/1-about_our_search_engine_marketing_services.htm [B,R=301,L]

(the two above without the $) Normal Redirect 301 instead of RewriteRule as well.

None of them worked :S

Please help!

Upvotes: 1

Views: 425

Answers (1)

Jon Lin
Jon Lin

Reputation: 143846

Try changing the regular expression to:

`^/search_engin</td$`

The %3C gets decoded before being put through the rewrite engine. Also, get rid of the leading slash if this rule is in an htaccess file. You don't need the NE or B flags, but everything else looks fine.

Upvotes: 2

Related Questions