Domain alias and htaccess

I have a few dozen websites deployed with bedrock and capistrano.

For one website that exists on a subdomain, I created another subdomain as alias. The original domain works like a charm, the alias is getting a 403 caused by my htaccess file.

My htaccess file:

RewriteCond %{HTTP_HOST} ^$ [NC,OR]
RewriteCond %{HTTP_HOST} ^$
RewriteCond %{REQUEST_URI} !current/www/
RewriteRule (.*) /current/www/$1 [L]

RewriteEngine on
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301,NC]

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /current/www
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

I would now need to update the htaccess in such a way that the alias would also load the site properly. But my understanding of htaccess is too poor to do this.

This topic was automatically closed after 42 days. New replies are no longer allowed.