Web Servers on Unix and Linux - problem with a redirectMatch directive

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Unix and Linux > February 2005 > problem with a redirectMatch directive





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author problem with a redirectMatch directive
jdonnell

2005-02-02, 5:49 pm

this worked perfectly on one host, but I'm having problems with it on a
new host.

redirectMatch 301 ^(.*)bb.html/(.*)$
http://www.blogbloc.com/index.php?PID=1596581
#

The problem is that the ? get's translated to %3f so the url it
redirects to is.
http://www.blogbloc.com/index.php%3fPID=1596581

How do I fix this?

Klaus Johannes Rusch

2005-02-08, 5:49 pm

jdonnell wrote:
> this worked perfectly on one host, but I'm having problems with it on a
> new host.
>
> redirectMatch 301 ^(.*)bb.html/(.*)$
> http://www.blogbloc.com/index.php?PID=1596581
> #
>
> The problem is that the ? get's translated to %3f so the url it
> redirects to is.
> http://www.blogbloc.com/index.php%3fPID=1596581


noescape|NE' (no URI escaping of output)

This flag keeps mod_rewrite from applying the usual URI escaping rules
to the result of a rewrite. Ordinarily, special characters (such as '%',
'$', ';', and so on) will be escaped into their hexcode equivalents
('%25', '%24', and '%3B', respectively); this flag prevents this from
being done. This allows percent symbols to appear in the output, as in

RewriteRule /foo/(.*) /bar?arg=P1\%3d$1 [R,NE]

--
Klaus Johannes Rusch
KlausRusch@atmedia.net
http://www.atmedia.net/KlausRusch/
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com