Double slash in URL

2010-12-09 Thread Igor Rubinovich
Hi, I'm relying on double slashes for certain things in my Django app and it's fine on my maching, but just discovered the hosting environment is reducing double slashes to single. Any idea how I can keep them using mod_rewrite? I'm trying something like RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ (

Re: Double Slash in URL

2008-09-08 Thread Ned Batchelder
This isn't true: forward slashes are not meaningful in Python regular expressions, and so do not need to be escaped. Even if you choose to (it doesn't hurt), you'd escape them with backslashes, not forward slashes. --Ned. http://nedbatchelder.com James Matthews wrote: > It's a regex you need t

Re: Double Slash in URL

2008-09-08 Thread David Zhou
On Sep 8, 2008, at 7:04 AM, Thomas Guettler wrote: > I discovered, that double slashes get through my regular expressions. > Is it possible to reject URLs with double slashes? > > http://.../...//test// (double slash before and after "test") Another way to approach it is to allow variable amoun

Re: Double Slash in URL

2008-09-08 Thread James Matthews
It's a regex you need to escape both slashes so you are looking at On Mon, Sep 8, 2008 at 4:04 AM, Thomas Guettler <[EMAIL PROTECTED]> wrote: > > Hi, > > I discovered, that double slashes get through my regular expressions. > Is it possible to reject URLs with double slashes? > > http://.../

Double Slash in URL

2008-09-08 Thread Thomas Guettler
Hi, I discovered, that double slashes get through my regular expressions. Is it possible to reject URLs with double slashes? http://.../...//test// (double slash before and after "test") project urls.py {{{ urlpatterns = patterns('', # MyApp (r'^', include('myapp.urls')), }}} myapp.url