从###### 1.co.uk(有SSL)访问文档根### / production时,一切正常。
但是,当从###### 2.co.uk(它没有在vhost文件中设置SSL)访问### / production时,主页显示正常,但其他页面正在返回404。
这里是vhost文件中的条目,指向##### 2.co.uk到### / 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>
快速谷歌搜索,这可以归结为### / production
中的.htaccess文件Options +FollowSymLinks
Options -Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#Old website redirects
RewriteRule ^(.+)\.aspx$ http://%{SERVER_NAME}/$1/ [QSA,NC,R=301,L]
RewriteRule default/?$ http://%{SERVER_NAME}/home/ [NC,R=301,L]
#SSL Redirects
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(.*)
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [L]
# Codigniter Page Handling
RewriteCond $1 !^(index\.php|content|assets|files|flash|uploads|xml|private/uploads|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
关于问题是什么的任何想法?
另请注意,##### 2.co.uk的目录设置为
<Directory /var/www/html/####/preprod>
与文档根目录不同。
DocumentRoot "/var/www/html/####/production"