.htaccess; no extension required

前端 未结 3 797
迷失自我
迷失自我 2020-12-18 04:03

I need some .htaccess code that will treat extensionless files as PHP files.

Suppose the visitors visits www.mywebsite.com/dir1/dir2/file.name, it will

3条回答
  •  醉话见心
    2020-12-18 04:30

    You should have a look at Apache's Options directive, most specifically the http://httpd.apache.org/docs/2.0/content-negotiation.html option which you can include in your .htaccess file and will do just that.

    Add to your .htaccess:

    Options +MultiViews
    

提交回复
热议问题