views:

33

answers:

1

The question is fairly simple but I was not able to find an answer for hours now.

What I need to do is:

RewriteRule ([^#])#(.*) $1\%23$2

Which basically means I want to url escape the freaking hash sign which comes to me from an external codepiece.

backslash (\) does not work to escape this sign... and please don't suggest using %23 instead # because it does not work as well.

(%23 does not match a # because it simply is not == %23)

A: 

The hash part of a URL is not available for rewriting. When a web browser sends a URL request to a web server it sends everything up to the hash sign. The hash is only available on the client (e.g. JavaScript code can see it).

John Kugelman
this is not a way to escape #, but apparently in my case it does not matter. so i'm gonno go ahead and set this one as accepted. thanks
kali