![]() |
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. |
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. |
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 ? |
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..... :) |
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 :) |
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. |
Quote:
|
All times are GMT -4. The time now is 01:03 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc