I have a problem with Apache doing a 301 redirect with encoded urls. The urls are encoded as they include Hebrew chars.
I’ve done some Googling and found out that there is a know bug with encoded urls and slashes and that I should encode the slash twice so that it becomes ‘%252f’.
Unfortunately none of what I tried worked.
The url that I would like to do the redirect for is the following (Just one Hebrew letter for the sake of simplicity):
Once past that, I’ll have to assume that your host “speaks” Hebrew, i.e., Hebrew is an enabled language. If that’s the case (which I expect it would be), then you can merely replace the UNencoded characters in the URI Path with the “plain text” characters … in Hebrew. At least, that’s what would happen inside a character range definition in mod_rewrite.
Apahce will not redirect, and the content of the file will just be displayed in the browser. Using the same .htaccess line on non hebrew files redirects fine.
I also tried replacing the / char with the encoded and double encoded representation as suggested here:
As you can see in that discussion there is some problem with slash and url encoded chars although I tried every possible variation and still can’t get apahce to redirect the hebrew URLs.
Okay, when one tool fails to “play nice,” then I tend to fall back on mod_rewrite (which DOES recognize other character sets but within a character range definition). Please comment out the Redirects and try:
RewriteEngine on
RedirectRule ^א\\.html$ http://www.tagetdomain.com [L]
OR
RewriteEngine on
RedirectRule ^[א]\\.html$ http://www.tagetdomain.com [L]