https://issues.apache.org/bugzilla/show_bug.cgi?id=53462
Priority: P2
Bug ID: 53462
Assignee: [email protected]
Summary: mod_rewrite does not remove trailing slash when asked,
says "IGNORING REWRITE"
Severity: normal
Classification: Unclassified
OS: Linux
Reporter: [email protected]
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 /[email protected]/test/ then I would like
to serve the content of file /[email protected]/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 '[email protected]/test/'
rewrite '[email protected]/test/' -> '[email protected]/test'
initial URL equal rewritten URL: /myserverpath/[email protected]/test [IGNORING
REWRITE]
No! The initial URL was [email protected]/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: [email protected]
For additional commands, e-mail: [email protected]