I have an apache webserver running on an ubuntu system.
To avoid access for unauthorized users, I have an active .htaccess
:
AuthType Basic
AuthName "own area"
AuthUserFile /path/to/.htpasswd
require user username
This .htacces
works fine by accessing all files insight the document root, like the index.php
. In this case, user authentication is required.
But now I'm looking for an way to disable this user authentication, if an specific uri was called, like: index.php?s=abc
In this case and only in this case the application should be available without authentication.
Is there a way to realize that? I'm not sure, how to start searching the web for that specific question?
Is the RewriteEngine
the key?
The server vhost config has an active rewrite rule with the following configuration:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteRule ^/([\w]+)$ /index.php?s=$1 [L]
Thank you.