RewriteEngine On
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/Windchill/(.*) https://%{SERVER_NAME}/Windchill/$1 [NE,R]
When it tries to rewrite following URL to https with no escaping (NE flag)
It ends up writing following URL
In this URL you can see it converted the "http" to "https", and it kept "%3A" intact since I had "NE" flag which prevents mod_rewrite from applying the usual URI escaping rules. So it all worked well except one thing. As you can see in the abo
ve URL,
it converted "%23" to it's original value "#". My question is why? I instructed the rewrite rule to keep it intact when comes any special characters and it kept all the "%3A" intact but for some reason it changed "%23" to "#". Anyone any idea? Please help.
mrahman