0
我在ec2 redhat实例上运行Apache。我有https启用和工作,使用conf.d/ssl.conf。我正在尝试重写网址,以便用户不必添加.php扩展名。但是,由于某种原因,它不起作用。以下是我已经加入的ssl.conf:mod_rewrite不适用于https
<VirtualHost _default_:443>
# General setup for the virtual host, inherited from global configuration
DocumentRoot "/var/www/https-html"
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]
.
.
.
</VirtualHost>
我得到一个404不带.php扩展,并能正常工作与扩展。