Remove .php extension with .htaccess

前端 未结 15 2183
一生所求
一生所求 2020-11-21 04:32

Yes, I\'ve read the Apache manual and searched here. For some reason I simply cannot get this to work. The closest I\'ve come is having it remove the extension, but it point

15条回答
  •  清歌不尽
    2020-11-21 04:55

    After changing the parameter AllowOverride from None to All in /etc/apache2/apache2.conf (Debian 8), following this, the .htaccess file just must contain:

    Options +MultiViews
    AddHandler php5-script php
    AddType text/html php
    

    And it was enough to hide .php extension from files

提交回复
热议问题