我有一个简单的.htaccess文件,它将所有非现有文件重定向到index.php 当我通过HTTP访问我的网站时,它工作正常。但是当我尝试使用HTTPS时 重定向无效。这是.htaccess内容:
RewriteEngine on
RewriteBase /
php_flag display_errors on
php_value error_reporting 7
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /var/www/index.php [NC,L,QSA]
P.S。我需要保留HTTP和HTTPS选项。