I’ve been working on plain HTML website, in which I wanted to have URLs without
.html extension in the end of the URLs. It turns out its relatively easy.
.htaccess file add the below line whereever appropriate
Multiview option tries to find a best match for the request received by server But keep in mind there are priorities in how it handles files types in directories.
From what I’ve tested the priority is directories first then
php and then
html. So lets say if you want your server to return
for the request
example.com/gallery then you should avoid having a
directory in the same location because the directory will be prioritised and the
server will return the directory.
Likewise if you have two files one
HTML and one
PHP. The request without the
file extension will return
PHP since apache by default prioritizes
HTML in Multiviews.
Support with Bitcoin
Found this article interesting or useful? Tip me if you'd like in below address