2

The question is very similar to this, but the accepted answer did not work in our case:

Remove string from URL using .htaccees

The website URL we're trying to redirect is the following:

http://www.example.com/fr/sub-folder/%E2%80%8E

The website is running WordPress. We simply want to redirect this url to the base page (http://www.example.com/fr/sub-folder/)

We first tried basic 301:

redirect 301 "/fr/sub-folder/%E2%80%8E" http://www.example.com/fr/sub-folder/

We tried the following:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/([a-zA-Z0-9_-]+)/\%20\%E2\%80\%8E$
RewriteRule ^(.*) http://example.com/fr/sub-folder/%1/ [R,L]

This little variation:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/([a-zA-Z0-9_-]+)/\%E2\%80\%8E$
RewriteRule ^(.*) http://example.com/fr/sub-folder/%1/ [R,L]

But nothing is working.

Any help would be appreciated.

Thanks,

Community
  • 1
  • 1
newpoison
  • 914
  • 2
  • 8
  • 20

1 Answers1

2

You can just use this rule:

RewriteRule /\xE2\x80\x8E$ /fr/sub-folder [L,R=302]
anubhava
  • 761,203
  • 64
  • 569
  • 643