|
2006-10-16, 06:23 PM | #1 |
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
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. |
2006-10-16, 07:34 PM | #2 |
You can't disprove anything with evidence that doesn't exist
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 |
2006-10-18, 03:12 AM | #3 |
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
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 ? |
2006-10-18, 11:13 AM | #4 |
a.k.a. Sparky
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 |
2006-10-19, 01:46 AM | #5 | |
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
Join Date: Mar 2005
Location: Canadeh
Posts: 197
|
Quote:
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 |
|
2006-10-19, 08:29 AM | #6 |
With $10,000, we'd be millionaires! We could buy all kinds of useful things like ... love!
|
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 |
2006-10-23, 03:12 AM | #7 | |
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
Join Date: Mar 2005
Location: Canadeh
Posts: 197
|
Quote:
|
|
|
|