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

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > htaccess Rewrite question: file renaming

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-28-2010, 12:30 PM
frankvh frankvh is offline
New Member
 
Join Date: Jul 2010
Posts: 8
Default htaccess Rewrite question: file renaming

My apologies for a noob question, but I've put a lot of time and googling into this yet I still haven't solved it. So help please!

I have a index.html file which is auto-generated by my tools (hence I don't want to manually rename it, because then I'd have to manually rename it every single time...) which contains PHP code. So I need to push it through the PHP parser. But only that one file.

In Apache in the .htaccess file I can do this:

<Files frankandcolleen/index.html>
RemoveHandler .html
AddType application/x-httpd-php .html
</Files>

This does not work on litespeed; my webhost tells me their litespeed doesn't support the Files directive.

I thought perhaps a rewrite might do the trick. Just to rename the file. Maybe something like this:

RewriteEngine on
RewriteRule frankandcolleen/index.html frankandcolleen/index.php [L]

This doesn't work either. Probably for a whole bunch of reasons...

Right now as an interim measure I'm doing this:

RemoveHandler .html
AddType application/x-httpd-php .html

This works, but it forces every single html file through the PHP parser, which is both slow, and CPU intensive on the server.

How do I push that html file, and only that file, through the PHP parser? Or rename that html file into a php file?

Thanks!!!
Reply With Quote
 

Tags
htaccess, mod_rewrite, rewrite

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 07:33 AM.



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