可能重复:
How to add .php extension using .htaccess url rewriting?
我想将.php扩展名添加到url。使用。“htaccess”我怎么做 我当前的网址是
http://www.abc
我想将其更改为
http://www.abc.php
.htaccess的内容是
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]
它放在我的应用程序的根目录中 问题already exist但它不适合我。我正在使用xampp服务器torun php
我不知道如何使用htaccess。我想知道
答案 0 :(得分:-1)
此代码将所有.html文件重写为.php
RewriteRule (.*)\.html$ $1.php