|Summary:||mod_rewrite does not remove trailing slash when asked, says "IGNORING REWRITE"|
|Product:||Apache httpd-2||Reporter:||godmar <godmar>|
|Component:||mod_rewrite||Assignee:||Apache HTTPD Bugs Mailing List <bugs>|
Description godmar 2012-06-25 04:26:51 UTC
I would like to use mod_rewrite to remove trailing slashes for certain locations. For instance if a user accesses /email@example.com/test/ then I would like to serve the content of file /firstname.lastname@example.org/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@example.com/test/' rewrite 'firstname.lastname@example.org/test/' -> 'email@example.com/test' initial URL equal rewritten URL: /firstname.lastname@example.org/test [IGNORING REWRITE] No! The initial URL was email@example.com/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.
Comment 1 William A. Rowe Jr. 2018-11-07 21:08:15 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd. As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd. If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question. If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with. Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.