Reply
php and htaccess
Old 05-14-2004, 11:16 AM php and htaccess
Skilled Talker

Posts: 93
Hi,
If you're using php in your webpages, can you modify htaccess so it will work on html pages?
If so, then
1.) can anyone tell me what to put into htaccess for this purpose? and
2.) any good reasons not to do this?
Thanks,
Amy
AmyD is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 05-14-2004, 12:30 PM
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
What do you mean by work on HTML pages? Do you mean trick Apache into parsing HTML pages like PHP?
__________________
He's baaaaaaaack....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
Old 05-14-2004, 12:56 PM
Skilled Talker

Posts: 93
yes.
When I started using ssi and didn't want to change all my extensions to shtml I added the line

AddHandler server-parsed .html

to the htaccess file.

I wanted to know if there's something similar for php.
AmyD is offline
Reply With Quote
View Public Profile
 
Old 05-16-2004, 05:45 PM
Skilled Talker

Posts: 93
Found it!
In case anyone else ends up with the same question, the line to add to the .htaccess file is

AddHandler application/x-httpd-php .htm .html


AmyD
AmyD is offline
Reply With Quote
View Public Profile
 
Old 05-18-2004, 05:35 AM
RonnieTheDodger's Avatar
Extreme Talker

Posts: 150
Location: Central USA
One thing you have to remember Amy is that this will add more burden on the Server, whether there is actually php code in the file or not. All .html files will get run thru the php pre-processor first. Follow?

If you are doing a general switching over of your coding from SSI (.shtml type file) to PHP, then I would advise at least removing the directive that you added for pre-processing your .html files as SSI. In effect, you will be running all of your files thru both processes when they do not need to be.
__________________
Ronnie T. Dodger

[Discount GHR-15] [hGH Renew-U][Webmaster Forum]
RonnieTheDodger is offline
Reply With Quote
View Public Profile Visit RonnieTheDodger's homepage!
 
Old 05-18-2004, 10:36 AM
Skilled Talker

Posts: 93
Got it. Thanks Ronnie.
AmyD is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to php and htaccess
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12427 seconds with 13 queries