mod_rewrite problem

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 ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2005
Geoff Soper
 
Posts: n/a
Default mod_rewrite problem

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]
  #2 (permalink)  
Old 04-13-2005
Mads Toftum
 
Posts: n/a
Default Re: mod_rewrite problem

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:09 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0