Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 05-14-2004, 12:16 PM php and htaccess
Skilled Talker

Posts: 93
Trades: 0
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
 
 
Register now for full access!
Old 05-14-2004, 01:30 PM
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
Trades: 0
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, 01:56 PM
Skilled Talker

Posts: 93
Trades: 0
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, 06:45 PM
Skilled Talker

Posts: 93
Trades: 0
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, 06:35 AM
RonnieTheDodger's Avatar
Extreme Talker

Posts: 232
Location: Central USA
Trades: 0
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

[
Please login or register to view this content. Registration is FREE
] [
Please login or register to view this content. Registration is FREE
]
RonnieTheDodger is offline
Reply With Quote
View Public Profile Visit RonnieTheDodger's homepage!
 
Old 05-18-2004, 11:36 AM
Skilled Talker

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
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.22970 seconds with 12 queries