How do I get LiteSpeed to do content negotiation like Apache did? My webhost provider was bought out and replaced Apache with LiteSpeed and regularly stuffs up my entire website in different ways. I write HTML from scratch, I do not use blogging software.
Previously mod_negotiation handled this kind of thing brilliantly:
Requesting a URI like "www.example.com/test" would automatically load a "test.html" file in the server root, if it exists. Or a "test.php" file, if it exists. Or a "test.shtml" file, if it exists. Or the default page in a "test" directory, if there was a "test" directory. Or list the contents in the "test" directory if there was one, and it didn't have a default page to serve in it.
I don't mean a case of choosing this or that, with some kind of priority, out of a list of things if all or some of them existed. I just want that clean URI to load the one thing that actually exists on the website.
Today I may create a flat "test.html" file, tomorrow I might replace it with a "test.shtml" file that had more features, or a "test.php" file with even more abilities. Later I may replace that one file with a "test" named directory full of detailed individual pages on the topic. And I want the links to that file to always be the same address (e.g. "www.example.com/test"), and likewise with all the other un-suffixed URLs I'll use.
If my site contains files such as
/contact.html
/info.html
/miscellaneous.html
Then I expect any link to "/contact" to load that "contact.html" page, a link to "/info" to load "info.html" etc., without a mass of special rules for each one.
And, yes, I have these options set in a .htaccess file
Options +Multiviews
MultiviewsMatch Any
Previously I didn't have the "MultiviewsMatch Any" setting, but I tried adding it today and it makes no difference.
But it all LiteSpeed manages to do is load a "test.html" file if it exists, no other kind of file. And even that fails at times, some links will work, some won't. Likewise with it sometimes will load a directory, other times I'm forced to append a slash onto the URL (and it makes little difference whether that directory has a default page, or will be a listing of the contents).
LiteSpeed is supposed to be a "drop-in" replacement for Apache, but is missing that necessary feature that Apache has had for decades.
Previously mod_negotiation handled this kind of thing brilliantly:
Requesting a URI like "www.example.com/test" would automatically load a "test.html" file in the server root, if it exists. Or a "test.php" file, if it exists. Or a "test.shtml" file, if it exists. Or the default page in a "test" directory, if there was a "test" directory. Or list the contents in the "test" directory if there was one, and it didn't have a default page to serve in it.
I don't mean a case of choosing this or that, with some kind of priority, out of a list of things if all or some of them existed. I just want that clean URI to load the one thing that actually exists on the website.
Today I may create a flat "test.html" file, tomorrow I might replace it with a "test.shtml" file that had more features, or a "test.php" file with even more abilities. Later I may replace that one file with a "test" named directory full of detailed individual pages on the topic. And I want the links to that file to always be the same address (e.g. "www.example.com/test"), and likewise with all the other un-suffixed URLs I'll use.
If my site contains files such as
/contact.html
/info.html
/miscellaneous.html
Then I expect any link to "/contact" to load that "contact.html" page, a link to "/info" to load "info.html" etc., without a mass of special rules for each one.
And, yes, I have these options set in a .htaccess file
Options +Multiviews
MultiviewsMatch Any
Previously I didn't have the "MultiviewsMatch Any" setting, but I tried adding it today and it makes no difference.
But it all LiteSpeed manages to do is load a "test.html" file if it exists, no other kind of file. And even that fails at times, some links will work, some won't. Likewise with it sometimes will load a directory, other times I'm forced to append a slash onto the URL (and it makes little difference whether that directory has a default page, or will be a listing of the contents).
LiteSpeed is supposed to be a "drop-in" replacement for Apache, but is missing that necessary feature that Apache has had for decades.
Last edited: