I got a domain with a website that can be reached by two urls, mydomain.com/pathA
and mydomain.com/pathB
.
But they are actually the same directory on the server. It contains a MediaWiki installation, which is quite large and contains image files that should be shared. But since I don't want to present it as a wiki per se, I want to be able to setup different hooks, add-ins, rights, skins, etc. So now I created a symbolic link from pathA to pathB and added this .htaccess in the doc root:
Options -Indexes
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/pathA
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /pathA/index.php?title=$1 [L,QSA]
RewriteCond %{REQUEST_URI} ^/pathB
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /pathB/index.php?title=$1 [L,QSA]
Now I want pathB to be protected using Apache authentication. Can I do that in this one .htaccess file? I cannot edit httpd.conf.
If this can be done without the symlink it is fine with me, as long as I can keep the single installation folder.