I want to restrict access to my site using Password Protection with .htaccess and .htpasswd, but since in the main directory a .htaccess file already exists it does not work straight away.
Could somebody explain how to maker it work together with existing .htaccess file.
My oxid shop version is CE 4.1.6_22740
Maybe there is a better way to ask for authentication to enter the website?
is missing, but this should throw an apache error.
Well depending on your configuration i might imagine that .htaccess is just completely ignored then …
When i am using this, all the mod_rewrite entries still work as they should.
AuthType Basic - is in my file, the whole code of .htaccess file looks like this. Is there something else missing? The authentification works, but apache mod_rewrite module stops working. The .htaccess file is in the main directory /public_htm.
If this code is alright, what other places I need to look in for the problem?
AuthType Basic
AuthName "My Protected Area"
AuthUserFile /home/lithuania…/.htpasswd
Require valid-user
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_URI} !(/core/|/export/|/modules/|/out/|/setup/|/tmp/|/views/)
RewriteRule admin/test.php$ admin/test.php?mod_rewrite=1
Well i cannot see, why the Auth Block makes the mod_rewrite block fail.
Anyway if you remove it and the mod_rewrite block functions then, you might want to move the Auth Block to the apache vhost.conf …