This is a discussion on mod_rewrite problem within the Linux Web Servers forums, part of the Web Server and Related Forums category; I'm using the following mod_rewrite rule to make sure all users end up with the same URL, it works ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I'm using the following mod_rewrite rule to make sure all users end up
with the same URL, it works well apart from when a request for http://geoffsoper.co.uk/get_photo.php?id=1542;v=1 is served with http://www.geoffsoper.co.uk/get_photo.php?id=1542%3bv=1 (I realise I've forgotten to validate the input before it's used in an SQL query and will remedy this ASAP) How do I stop the rewritten URL becoming URLencoded like this? RewriteEngine On RewriteCond %{HTTP_HOST} ^geoffsoper\.co\.uk [NC] RewriteRule ^/(.*) http://www.geoffsoper.co.uk/$1 [R=301,L] |
|
|||
|
On 12 Apr 2005 13:37:31 -0700, Geoff Soper <geoff.google.nospam@alphaworks.co.uk> wrote:
> How do I stop the rewritten URL becoming URLencoded like this? > To quote the docs: '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. vh Mads Toftum -- Speaking at ApacheCon 2005/EU - http://apachecon.com |
| Thread Tools | |
| Display Modes | |
|
|