I've been rewriting my URLs like this:
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Which works fine, however I have a subdirectory that is password protected via apache/htaccess. When I navigate to this directory, my browser gets a 401 error. Does anyone know how to solve this?
Try putting:
ErrorDocument 401 "Unauthorized Access"
RewriteEngine off
... Authorisation lines
In the .htaccess file containing your authorisation directives.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With