views:

94

answers:

1

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 /?

+1  A: 
RewriteEngine On
RewriteCond %{REQUEST_URI} (.*)\\(.*)
RewriteRule .* %1/%2 [R=301]
Jason Weathered
Perfect thanks.
DRL