How to change the PHP file extension using .htaccess file on GoDaddy Linux Hosting?

后端 未结 1 924
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-06 19:02

I am using the following .htaccess rules to modify the PHP file extensions to HTML:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUES         


        
1条回答
  •  攒了一身酷
    2020-12-06 19:43

    try this:

    RewriteEngine on
    RewriteRule ^(.*)\.html$ $1.php
    

    when you will access page1.html the system will look for: page1.php

    0 讨论(0)
提交回复
热议问题