htaccess remove .php extension, index.php AND add trailing slash

前端 未结 2 1774
别跟我提以往
别跟我提以往 2021-01-01 08:07

This is for basic HTML/PHP pages, no query strings, etc.. I have searched high and low and find resources for removing the \'index.php\' from the URI, or removing \'.php\' a

2条回答
  •  心在旅途
    2021-01-01 08:46

    You can try this in your htaccess file:

    Options +MultiViews
    

    But it depends on wheter it is enabled by your webserver. Also, do note that htaccess files are specific to Apache webservers, so it won't work if you're using something else.

提交回复
热议问题