简体   繁体   中英

.htaccess gives error while on RewriteEngine

I have .htaccess file in my main project folder and I want to remove.php extension from my pages in Url I wrote the .htaccess file as below. .htaccess 文件

by the way it gives my the following error. I dont think my .htaccess configurations are wrong but still it doesn't work.

我的索引文件

apache error logs 在此处输入图像描述

use this code

RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM