You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by joshua hough <jo...@openc.k12.or.us> on 2005/04/13 21:17:09 UTC
[users@httpd] RedirectMatch or Rewrite: backslash to forward slash
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(.*)$ http://domain.com/directory/$1
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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] RedirectMatch or Rewrite: backslash to forward
slash
Posted by joshua hough <jo...@openc.k12.or.us>.
On Wednesday, April 13, 2005 4:13 PM -0400 Joshua Slive wrote:
> Total guess:
> Redirect /directory\\ http://domain.com/directory/
> (on the assumption that apache is treating the backslash as an escape
> character)
Thanks, but that doesn't work either. I don't see any difference whether I
use \\ or %5C. Other possibilities?
-Josh
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] RedirectMatch or Rewrite: backslash to forward slash
Posted by Joshua Slive <js...@gmail.com>.
On 4/13/05, joshua hough <jo...@openc.k12.or.us> wrote:
> 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(.*)$ http://domain.com/directory/$1
>
> If this would be better accomplished with Rewrite, I would appreciate an
> example. Thanks.
Total guess:
Redirect /directory\\ http://domain.com/directory/
(on the assumption that apache is treating the backslash as an escape character)
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org