Multiviews support

my web host just switched from Apache to Lightspeed and now half my site is not working. Before the switch used to bring up pagename.php. Now I get a 404 error unless I add .php to all of my links.

I have searched the forums for Mutiviews and nothing I've seen has worked for me.


LiteSpeed Staff
Please try a simple rewrite rule in .htaccess to rewrite the rule from foo to foo.php for you.

RewriteCond  %{[SIZE=-1]DOCUMENT_ROOT}/[/SIZE][SIZE=-1]%{REQUEST_URI}.php -f
RewriteRule ^(.*)$  $1.php
Wow... I wish I would have posted this two weeks ago when I started having the issue. That worked great. Can I duplicate that code for html and htm files? For example:

RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI}.html -f
RewriteRule ^(.*)$ $1.html


RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI}.htm -f
RewriteRule ^(.*)$ $1.htm
If you have a URI scheme like this, utilizing PATHINFO:
/topic/Office/Work -> /topic.php/Office/Work
/update/Office/Work -> /update.php/Office/Work
/topic-> /topic.php

# Multiviews
RewriteEngine On
RewriteCond %{REQUEST_URI} !.+php*
RewriteCond %{DOCUMENT_ROOT}/$1\.php -f
RewriteRule ^([^/]+)/?(.*)$ $1.php/$2 [L]