httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53462] New: mod_rewrite does not remove trailing slash when asked, says "IGNORING REWRITE"
Date Mon, 25 Jun 2012 04:26:51 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53462

          Priority: P2
            Bug ID: 53462
          Assignee: bugs@httpd.apache.org
           Summary: mod_rewrite does not remove trailing slash when asked,
                    says "IGNORING REWRITE"
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Reporter: godmar@gmail.com
          Hardware: All
            Status: NEW
           Version: 2.2.14
         Component: mod_rewrite
           Product: Apache httpd-2

I would like to use mod_rewrite to remove trailing slashes for certain
locations.  For instance if a user accesses /me@vt.edu/test/ then I would like
to serve the content of file /me@vt.edu/test (if it exists).

Legimitate request?

I'm using this rule:

RewriteRule ^(.*@.*/.+)/$ $1

in an attempt to strip the trailing slash.

mod_rewrite says in its log:

applying pattern '^(.*@.*/.+)/$' to uri 'me@vt.edu/test/'
rewrite 'me@vt.edu/test/' -> 'me@vt.edu/test'
initial URL equal rewritten URL: /myserverpath/me@vt.edu/test [IGNORING
REWRITE]

No! The initial URL was me@vt.edu/test/ and it's NOT equal to the rewritten
URL.

Interestingly, if I use a redirect, as in

RewriteRule ^(.*@.*/.+)/$ $1 [R]

it works, but of course is very inefficient (and does not work with clients
that don't automatically follow redirects!)

I think this should work, hence file this as a bug.  Thanks.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message