Hide PHP from user

后端 未结 5 1698
粉色の甜心
粉色の甜心 2021-01-14 04:16

Is there a way to hide the fact that I\'m using PHP from my users? I wanted to do this for two reasons:

  • 1) So the links in the address bar look cleaner (like h
5条回答
  •  北恋
    北恋 (楼主)
    2021-01-14 04:44

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^(.*)$ $1.php
    

    http://eisabainyo.net/weblog/2007/08/19/removing-file-extension-via-htaccess/

提交回复
热议问题