LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > Multiviews support

Reply
 
Thread Tools Display Modes
  #1  
Old 07-06-2007, 08:32 AM
molespf molespf is offline
New Member
 
Join Date: Jul 2007
Posts: 2
Thumbs down Multiviews support

my web host just switched from Apache to Lightspeed and now half my site is not working. Before the switch http://mysite.com/directory/pagename 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.
Reply With Quote
  #2  
Old 07-06-2007, 02:14 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Please try a simple rewrite rule in .htaccess to rewrite the rule from foo to foo.php for you.

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


Reply With Quote
  #3  
Old 07-06-2007, 02:28 PM
molespf molespf is offline
New Member
 
Join Date: Jul 2007
Posts: 2
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

and

RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI}.htm -f
RewriteRule ^(.*)$ $1.htm
Reply With Quote
  #4  
Old 07-06-2007, 02:43 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Yes, absolutely.
Reply With Quote
  #5  
Old 05-26-2009, 06:16 PM
mangochutney mangochutney is offline
New Member
 
Join Date: May 2009
Posts: 2
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]
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:04 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.