When accessing from ######1.co.uk (which has an SSL) to document root ###/production everything works fine.
However when accessing ###/production from ######2.co.uk (which doesn't have an SSL - set up in the vhost file) the home page displays fine but the other pages are returning a 404.
Here's the entry in the vhost file that points #####2.co.uk to ###/production
<VirtualHost *:80>
DocumentRoot "/var/www/html/####/production"
ServerName #####2.co.uk
ErrorLog "/etc/httpd/logs/####.error.log"
CustomLog "/etc/httpd/logs/####.log" common
<Directory /var/www/html/####/preprod>
AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/var/www/html/secure/.htpasswd"
Require valid-user
order allow,deny
allow from all
AllowOverride all
</Directory>
<Location /api/sms>
AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/var/www/html/secure/.htpasswd"
Require valid-user
</Location>
</VirtualHost>
Done a quick google search and this could be down to the .htaccess file in ###/production
Options +FollowSymLinks
Options -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteRule ^(.+).aspx$ http://%{SERVER_NAME}/$1/ [QSA,NC,R=301,L]
RewriteRule default/?$ http://%{SERVER_NAME}/home/ [NC,R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(.)
RewriteRule ^(.)$ https://%{SERVER_NAME}/$1 [L]
RewriteCond $1 !^(index.php|content|assets|files|flash|uploads|xml|private/uploads|robots.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Any ideas as to what the problem is?
Also note that the Directory of #####2.co.uk is set to
<Directory /var/www/html/####/preprod>
Which is different to the Document Root.
DocumentRoot "/var/www/html/####/production"