0
ec2 redhat 인스턴스에서 Apache를 실행하고 있습니다. 나는 https를 사용 가능하게하고 conf.d/ssl.conf를 사용하여 작업한다. 사용자가 .php 확장자를 추가 할 필요가 없도록 URL을 다시 작성하려고합니다. 그러나 어떤 이유로 인해 작동하지 않습니다. 다음은 ssl.conf에 추가 한 내용입니다.https에 mod_rewrite가 작동하지 않습니다.
<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>
.php 확장자가없는 404가 표시되며 확장자와 잘 작동합니다.