Re: mod_rewrite, apache2, php5RC1 and osx bsd
| From: | Marcus Bointon | Date: | Fri, 11 Nov 2005 11:50:01 +0000 |
| Subject: | Re: mod_rewrite, apache2, php5RC1 and osx bsd | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-225605@lists.php.net to get a copy of this message | ||
On 10 Nov 2005, at 21:36, Richard Lynch wrote:
On Wed, November 9, 2005 10:36 pm, Dan Rossi wrote:There's nothing really wrong with a URL like that, and I used to do the same thing until I discovered another fly in this particular ointment. Should source URLs like these ever appear in Microsoft Outlook, they are likely to get 'corrected', for example a URL that goes in as: http://example.com//////example.video When you click it, you're quite likely to have it go to: http://example.com/example.video thus completely missing all your mod_rewrite patterns. This is why we love MS so. I've taken up using _ as a pattern separator as a workaround. There's also a very nasty bug in current mod_rewrite (at least in Apache 2.0.54) where mod_rewrite url decodes submatches between input and output URLs, so for example: RewriteRule ^(.*) blah.php?x$1 if you feed that a URL that contains a URL encoded value like 'Hello%20there', your resulting URL will be: 'blah.php?x=Hello there', which is obviously broken. Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture marcus@synchromedia.co.uk | http://www.synchromedia.co.ukRewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/(.+\.(video))$ ../../phpscript.phpI should think all those .* should be .+ instead... I mean, if somebody surfs to this URL: http://example.com//////example.video