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} ^sub.domain.be$ [NC,OR]
RewriteCond %{HTTP_HOST} ^sub.domain.be$
RewriteCond %{REQUEST_URI} !current/www/
RewriteRule (.*) /current/www/$1 [L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.be [NC]
RewriteRule ^(.*)$ https://sub.domain.be/$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]
</IfModule>
I would now need to update the htaccess in such a way that the alias sub2.domain.be
would also load the site properly. But my understanding of htaccess is too poor to do this.