0

I tried adjusting the examples given in other post, but cannot get them to work.

I am trying to get:

      http://www.myweb.com/%E2%80%A6/myfile.htm

to redirect to:

      http://www.myweb.com/mydirectory/myfile.htm

I tried 301 which obviously will not work, as the /%E2%80%A6 is an ellipse used by some websites to shorten the url. I also tried RewriteRule, which I am not that good at. Thanks for any help.

Frank
  • 71
  • 1
  • 1

2 Answers2

1

You can use hex code directly in RewriteRule:

RewriteEngine On

RewriteRule ^\xE2\x80\xA6/(myfile\.htm)$ mydirectory/$1 [L,NE,NC,R]
anubhava
  • 761,203
  • 64
  • 569
  • 643
0

I needed to redirect http://www.bentonswcd.org/resources/rural-living/%20%E2%80%8E to http://www.bentonswcd.org/resources/rural-living/. I tried the suggestion here and in these other posts and none worked: Trying to Redirect 301 %E2%80%A6 in htaccess file Redirect %20%E2%80%8E How to redirect %E2%80%8E and other weird links to right place?

Then a friend of mine suggested this fix, and it worked great. Hope it can work for you:

RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\%20%E2%80%8E(.*)\ HTTP/ [NC]
RewriteRule ^.*$ /%1 [R=301,L] 
Community
  • 1
  • 1