Topic: Url with Unicode - ISAPI_Rewrite doesnt r
|

|
| Author |
|
SweeT EviL Newbie

Joined: 09 February 2011
Online Status: Offline Posts: 20
|
| Posted: 20 July 2011 at 7:52am | IP Logged
|
|
|
I use ISAPI_Rewrite v2 for url rewriting quite a while. The site is in the Hebrew language and so the pages urls.
ISAPI_Rewrite v2 doesnt support Hebrew characters, but I overcome this problem by using ASCII code for the hebrew
characters. Here is an example:
Code:
RewriteRule ^/\%D7\%A6\%D7\%95\%D7\%A8_\%D7\%A7\%D7\%A9\%D7\%A8/$ /Contact.aspx [L,I]
RewriteRule ^/\%D7\%A6\%D7\%95\%D7\%A8_\%D7\%A7\%D7\%A9\%D7\%A8$ /Contact.aspx [L,I] |
|
|
The problem: While checking my popular pages in statcounter I came across this url:
Code:
| http://mysite.com/%u05F6%u05E5%u05F8_%u05F7%u05F9%u05F8 |
|
|
Which is the same URL rule as in my example but in Unicode! And apparently ISAPI_Rewrite v2 doesnt handle this
URLs, And I the user get "The page cannot be found".
There is also pages that are more complex, for example send part of the URL as a query parameter.. Which also in
Unicode.
I though only on one solution - make the same rules, this time in Unicode and deal with the Unicode in the code
behind. But there's 2 problems with the solution:
1.The URL shows for the user in Unicode and not in the Hebrew language.
2.More code in the code behind which, for my opinion, doesnt need to be. What I mean is that this scenario
can/need to be handle before it reach the code..
Any thoughts?
Thanks.
|
| Back to Top |
|
| |
Guests Guest

Joined: 01 October 2003
Online Status: Online Posts: -149
|
| Posted: 21 July 2011 at 3:30am | IP Logged
|
|
|
Hello,
Using ASCII code for the hebrew is not supported in ISAPI_Rewrite 2. We suggest you update to ISAPI_Rewrite 3.
There's, actually, a workaround that includes usage of UTF-8 coding, if this suits you.
Regards
Andrew
|
| Back to Top |
|
| |
SweeT EviL Newbie

Joined: 09 February 2011
Online Status: Offline Posts: 20
|
| Posted: 21 July 2011 at 7:50am | IP Logged
|
|
|
I meant UTF-8 , not ASCII - and this isnt the issue. The
Unicode that appearing is!
|
| Back to Top |
|
| |
SweeT EviL Newbie

Joined: 09 February 2011
Online Status: Offline Posts: 20
|
| Posted: 21 July 2011 at 8:36am | IP Logged
|
|
|
And I cant upgrade to V3 because its a shared server.. (not
mine)
|
| Back to Top |
|
| |
|
|
If you wish to post a reply to this topic you must first login
If you are not already registered you must first register
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum
|