httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshua hough <>
Subject Re: [users@httpd] Resolved: rewrite backslash to forward slash
Date Tue, 19 Apr 2005 13:52:07 GMT
Thanks to Scott Gifford for confirming the proper syntax:
    RewriteRule ^(.*)\\(.*)$ $1/$2 [R]
Which I'd tried in various forms without some necessary conditions.
Apparently it was a mistake to use the encoded version of backslash, %5C.
And the RewriteEngine should have either been turned on at the beginning or
off at the end, not both.  And finally, RewriteBase was needed to designate
the path that both the HTTP request and the desired destination had in
common.  Original follows.

On 4/15/05 2:56 PM, "joshua hough" <> wrote:
> Someone must know the answer to this...
> How do I rewrite backslashes in URLs to forward slashes?  I've tried
> various syntax in my .htaccess using %5C for the backslash character, but
> so far haven't been able to even capture those requests, let alone redirect
> them.  My specific example is like this:
> RedirectMatch ^/directory%5C(.*)$$1
> What's wrong with my syntax?  If this would be better accomplished with
> Rewrite, I would appreciate an example.  Thanks.
> -Josh

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message