8

.htaccess password protect and mod rewrite in same file

view full story
linux-howto

http://stackoverflow.com – I’d like to protect a development directory of my site using a .htaccess file whilst also using the .htaccess file to allow mod rewrite. However, I’m getting a standard apache2 error page when using the following .htaccess file even though the .htpasswd file is set correctly: RewriteEngine on RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^offers/processing/ /offers/processing.php [NC] RewriteRule ^offers/([^/]+)/?$ /offers/index.php?$2&show=$1 [N,QSA] AuthUserFile /home/site/dev (HowTos)