CodeIgniter Forums
What's problem with .htaccess? - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: What's problem with .htaccess? (/showthread.php?tid=11987)

What's problem with .htaccess? - El Forum - 10-01-2008

the .htaccess file in site's root

RewriteEngine ON

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

RewriteRule . /index.php [L]

I have a sub-directory "admin"
I put an other .htaccess file to protect admin panel

AuthType Basic
AuthName "Please Login"
AuthUserFile "/home/xxx/.htpasswds/public_html/"
require valid-user

when I visite

the second .htaccess will NOT work. It redirect to

If remove the .htaccess file in the site root, admin directory .htaccess will work fine.

How can I do?

What's problem with .htaccess? - El Forum - 10-01-2008

anybody help me?

What's problem with .htaccess? - El Forum - 10-02-2008

Though admin is a sub folder, try to access any controller (say and see what's happen. moreover, make sure you don't have file.