Using .htaccess to replace backslash in URL with forward-slash
Posted
by DamienL
on Stack Overflow
See other posts from Stack Overflow
or by DamienL
Published on 2010-06-16T16:00:55Z
Indexed on
2010/06/16
16:02 UTC
Read the original article
Hit count: 329
.htaccess
I realise that a backslash should never appear in a URL in a form other than a URL escape code, however in this case the URL's are being generated by a .NET application for generating flashbooks. I have contacted the developer of this application with a bug report.
In the interim i would like to use .htaccess to rewrite the offending backslashes.
This is how the URLs appear in fiddler debugging proxy.
www.example.com/folder/folder/thumbs%5C1.jpg
I am using Firefox and it looks as though Firefox is translating them into the URL encoded equivalent ( \ == %5C1 ). Interestingly IE translates the backslash into a forward-slash automatically (not adhering to standards but convenient in this case).
Is there a way to use .htaccess to rewrite all \ to /?
© Stack Overflow or respective owner