Ticket #215 (reopened enhancement)

Opened 2 years ago

Last modified 9 months ago

Obsolete rewrite rules in htaccess ?

Reported by: kipit Assigned to: somebody
Priority: normal Milestone: WPMU 2.0
Component: component1 Version: 2.0
Severity: normal Keywords: rewriterule htaccess loop
Cc:

Description

The following lines are not necessary with a vhost install and $base = '/' :

RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]

They could conduct to an infinite rewrite loop and lead the web server to a 500 error.

Change History

01/18/07 17:22:07 changed by donncha

  • status changed from new to closed.
  • resolution set to invalid.

Have you tested this and verified that it creates an infinite loop? The rules look ok to me as the "?" makes the first regex optional so it will match vhosts installed on '/'

I'm going to close this bug, if you have verified this is a bug I'd like to see how to reproduce it. Thanks!

01/18/07 18:04:01 changed by kipit

  • status changed from closed to reopened.
  • resolution deleted.

Sure ! For the first one : http://fqdn/wp-random/random-file.ext

Cannot find old loops for the second rule, I will fill the ticket if I found one.

01/22/07 16:23:14 changed by donncha

  • status changed from reopened to closed.
  • resolution set to invalid.

I jus tested this with a text file in wp-content and fetching that file through the web browser worked fine. Just in case, I also created a wp-random directory and that worked fine too.

01/25/07 13:50:10 changed by kipit

  • status changed from closed to reopened.
  • resolution deleted.

Just try with any non existent file. To be clear, try, for example : http://grsdhelpdesk.edublogs.org/wp-random/random-file.ext

03/21/07 16:17:46 changed by donncha

  • status changed from reopened to closed.
  • resolution set to fixed.

I added checks in the default htaccess.dist to verify the file or directory exists first. I just realised they may cause problems with some installs that aren't installed in the root..

03/29/07 10:05:47 changed by donncha

This caused problems for people so I reversed these changes as it's an obscure error.

http://mu.wordpress.org/forums/topic.php?id=3880&replies=3

09/26/07 16:29:08 changed by vviljo

  • status changed from closed to reopened.
  • resolution deleted.

This needs to be reopened, as it is still relevant.

Any non-existant url ending with a slash and having wp- in it cause the loop.

Examples:

http://blogs.helsinki.fi/foo/wp-/ http://blogs.helsinki.fi/wp-/

Unfortunately my mod_rewrite knowledge isn't good enough to debug this further.