waveflux Posted June 20, 2006 Share Posted June 20, 2006 My weblog runs on MT 3.2; I tried implementing password protect via CPanel for a sub-blog directory, but I only get error messages when I try to access the sub-blog. As with kristian's situation, the problem seems to be the mod_rewrite conditions in htaccess. If I delete those rewrite rules in the main htaccess, the problem disappears. Deleting those rules in the subdirectory's htaccess does nothing at all. Can anyone suggest a workaround that would allow me to password protect the sub-blog without trashing the mod-rewrite rules for the main weblog? Quote Link to comment Share on other sites More sharing options...
waveflux2 Posted June 23, 2006 Share Posted June 23, 2006 Anybody? Anybody? Bueller? Found the answer. To force the rewrite rules in my site's main .htaccess to ignore subdirectory "foo", I inserted the following code into the beginning of the main .htaccess, before any other rules. This allowed the standard password-protection procedure to apply to "foo" while leaving the rewrite rules in place for the rest of the site. ><IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^.*foo.*$ RewriteRule . /index.php [L] </IfModule> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.