Problem with mod_rewrite

Statskij

Active Member
#1
I have a problem with my site and have no ideas about how to solve it. In my root directory I have .htaccess file like this:

Options -Indexes
Options +FollowSymLinks
Options -MultiViews
AllowOverride None
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.site.com$ [NC]
RewriteRule ^(.*)$ http://site.com/$1 [R=301,L]
RewriteCond $1 !^(index\.php|css|img|files|swf|js|forum)
RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]

So, we rewrite all requests except requests to several dirs to index.php. So, when I request site.com/forum or site.com/forum/admincp, everything is ok - there is no rewrite to index.php. But when I protect admincp with htaccess, root .htaccess starts to rewrite forum/admincp to index.php. Any ideas?
 

mistwang

LiteSpeed Staff
#2
This issue has been addressed in our 4.0.4 build.
For earlier release, you need to add a custom error page for 401, usually, you just create a file with name 401.shtml under document root directory.
 

auser

Super Moderator
#5
So, we rewrite all requests except requests to several dirs to index.php. So, when I request site.com/forum or site.com/forum/admincp, everything is ok - there is no rewrite to index.php. But when I protect admincp with htaccess, root .htaccess starts to rewrite forum/admincp to index.php. Any ideas?
I have a question regarding "when I protect admincp with htaccess", how you did it? I'd see if I can reproduce the problem.
 
A

annoumure

Guest
#6
Z,

WP hijacks every REQUEST_URI sent to its directory and sends it all to its index.php. Yes, your plugin creator would have to modify the mod_rewrite AND some WP module to deal with the change in the URI.

Regards,

DK
 
Top