Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2006-10-16, 06:23 PM   #1
Doug E
Kids are great, Appu. You can teach them to hate the things you hate and they practically raise themselves now-a-days, you know, with the internet and all
 
Doug E's Avatar
 
Join Date: Mar 2005
Location: Canadeh
Posts: 197
Using PHP Program With HTML Extensions

I just downloaded and installed a hardlink script that is PHP based. The problem Im having now is all my sites sit on pages with the extensions .html and .shtml

Is there anyway to run a software program thats supposed to go with .php with my .html and .shtml ?

The program is Links Organizer btw.
__________________
Asian Porn | Sora Aoi | Natt Kesarin
Doug E is offline   Reply With Quote
Old 2006-10-16, 07:34 PM   #2
dareutwo
You can't disprove anything with evidence that doesn't exist
 
dareutwo's Avatar
 
Join Date: Mar 2003
Location: NW Minnesota - pop 865 +/- 1
Posts: 2,038
Try using this in your htaccess

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

Note - this will make php work but ALL ssi calls will Not. It's an either or sort of thing.
__________________
This is me Mark's-Links
dareutwo is offline   Reply With Quote
Old 2006-10-18, 03:12 AM   #3
Doug E
Kids are great, Appu. You can teach them to hate the things you hate and they practically raise themselves now-a-days, you know, with the internet and all
 
Doug E's Avatar
 
Join Date: Mar 2005
Location: Canadeh
Posts: 197
ahh so I can use my php script on an html file but not my tgp script ?

also, for .shtml files do i need to use a 'AddType application/x-httpd-php .html .htm' line in my .htaccess as well ?
__________________
Asian Porn | Sora Aoi | Natt Kesarin
Doug E is offline   Reply With Quote
Old 2006-10-18, 11:13 AM   #4
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
AddType application/x-httpd-php .html .htm .shtml

Add the .shtml if you want to parse .shtml for php.

You actually can parse for both in Apache2 by setting up an INCLUDES filter on the content.

Make sure pages are already parsed, then do something like:

AddOutputFilterbyType INCLUDES text/html

maybe.....
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2006-10-19, 01:46 AM   #5
Doug E
Kids are great, Appu. You can teach them to hate the things you hate and they practically raise themselves now-a-days, you know, with the internet and all
 
Doug E's Avatar
 
Join Date: Mar 2005
Location: Canadeh
Posts: 197
Quote:
AddType application/x-httpd-php .html .htm .shtml

Add the .shtml if you want to parse .shtml for php.

You actually can parse for both in Apache2 by setting up an INCLUDES filter on the content.

Make sure pages are already parsed, then do something like:

AddOutputFilterbyType INCLUDES text/html

maybe.....
hmmm. my tgp script, the template page is in a folder like mysite.com/vanilla/sitetemplates/main.shtml

that parses mysite.com/main.shtml

now if i drop an .htaccess file into mysite.com folder to php parse .shtml its going to parse both main.shtml files. is their somehow i can make this .htaccess php command just parse the mysite.com/main.shtml file? so that it doesnt affect the vanilla/sitetemplates/main.shtml file.

this is getting complicated for my noob ass. i might just have to find some inferior software thats non php babsed
__________________
Asian Porn | Sora Aoi | Natt Kesarin
Doug E is offline   Reply With Quote
Old 2006-10-19, 08:29 AM   #6
oast
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
 
oast's Avatar
 
Join Date: May 2004
Location: UK
Posts: 316
In the 'sitetemplates' directory add another .htaccess file with the one line

RemoveType .htm .html .shtml

That will undo what the AddType did in your root, in effect setting the extensions back to their defaults.

==Extra Note==
You could/should put it in any directories below root in which you have .htm(l) files to prevent the server wasting resources as it tries to parse static .htm(l) files.
__________________
Playboy Webmasters - The name says it all! $35 per signup or 60% revshare.

Last edited by oast; 2006-10-19 at 08:37 AM.. Reason: Added extra note
oast is offline   Reply With Quote
Old 2006-10-23, 03:12 AM   #7
Doug E
Kids are great, Appu. You can teach them to hate the things you hate and they practically raise themselves now-a-days, you know, with the internet and all
 
Doug E's Avatar
 
Join Date: Mar 2005
Location: Canadeh
Posts: 197
Quote:
In the 'sitetemplates' directory add another .htaccess file with the one line

RemoveType .htm .html .shtml

That will undo what the AddType did in your root, in effect setting the extensions back to their defaults.

==Extra Note==
You could/should put it in any directories below root in which you have .htm(l) files to prevent the server wasting resources as it tries to parse static .htm(l) files.
will do, thanks very much for the help!
__________________
Asian Porn | Sora Aoi | Natt Kesarin
Doug E is offline   Reply With Quote
Reply


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 -4. The time now is 11:29 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc