How can I use Multiviews with LiteSpeed web server?

Multiviews is a webserver option directly supported by Apache, but not supported by LiteSpeed. However, you can easily use RewriteCond / RewriteRule to ahieve the same functionality as Multiviews.


If you have a URI that uses PATHINFO, here's how the redirection should work:
/topic/Office/Work ==> /topic.php/Office/Work
/update/Office/Work ==> /update.php/Office/Work/topic-> /topic.php


Here's a code example to implement Multiviews that uses PATHINFO:

# Multiviews example code...use this in a .htaccess file
RewriteEngine On
RewriteCond %{REQUEST_URI} !.+php*
RewriteCond %{DOCUMENT_ROOT}/$1\.php -f
RewriteRule ^([^/]+)/?(.*)$ $1.php/$2 [L]
 

For more examples on how to do it, please check the following links...
http://litespeedtech.com/support/forum/showthread.php?t=234
http://litespeedtech.com/support/forum/showthread.php?t=298
http://www.litespeedtech.com/support/forum/showthread.php?t=1143

Was this answer helpful?

Also Read
How do I work with suPHP and .htaccess files?

Some configuration lines won't work with suPHP - at least, not within the .htaccess file. In...

What is the path to sendmail?

The sendmail path is /usr/sbin/sendmail

How can I enable register_globals for my account?

'register_globals' is a PHP Directive. This is no longer being used in the newer version of PHP...

How do I access my hosting account thru SSH?

If you are an expert Linux user, then you may love to use SSH to manage your hosting account. To...

This page contains both secure and nonsecure items...

This below message occurs when you attempt to view a web page using https that contains images...