mod_rewrite help needed

update: fixed!

This bug has dragged on and on, and I bet the fix is one line in the rewrite rules. The problem in a nutshell is that the rewrite engine is not ignoring “real files” like it should be. When accessing the real file path http://blogs.example.com/wp-admin/admin.php?import=rss&b=myslug, the rewrite engine does not ignore it. More details in the ticket.

The problem only happens when using directory style URLs, and not with subdomains.

Here are the rewrite rules:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^profile/? wp-admin/profile.php?%{QUERY_STRING} [L]
RewriteRule ^login/? wp-login.php?%{QUERY_STRING} [L]
RewriteRule ^register/? wp-register.php?%{QUERY_STRING} [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^([A-Za-z0-9_-]+)/admin/?$ wp-admin/index.php?b=$1&
RewriteRule ^([^/]+)/admin/?([^/]+php)\??(.*) wp-admin/$2?b=$1&%{QUERY_STRING} [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_URI} !^(.+)/admin(.*)
RewriteCond %{REQUEST_URI} !^(.+)/index.php(.*)

RewriteRule ^([A-Za-z0-9_-]*)/? /index.php?b=$1 [L,QSA]

help!


1 Comment so far
Leave a comment

Hey,

Perhaps just:

RewriteRule ^admin/admin.php?$ wp-admin/index.php$1?%{QUERY_STRING} [QSA,L]

Take Care,
Will



WAIT! If you need Lyceum support, use the email list or IRC channel. If you have found a bug, file a ticket or send email to lyceum-bugs AT lists DOT ibiblio DOT org.

 

Leave a comment
HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>