Reply
PHP & SSI: Parsing & File Extensions Question
Old 07-23-2005, 06:56 PM PHP & SSI: Parsing & File Extensions Question
Novice Talker

Posts: 9
I've been using SSI on my site for two years now (I dread it now), and so far it has worked well. But now I'm planning on doing some major upgrades (example: Skin chooser) and for that I need the functionality that PHP provides (i.e. cookies, sessions, etc.). But the problem is that I'm happy with my ratings in Google. If I change my .shtml files into .php I will loose many rankings because of that. What I need is a way to not have to change any file names but still get the function PHP provides..

The two ways I thought of having this done is 1) Redirect all my .shtml files into the .php files. But I've many files and it would be a nightmare. 2) Include PHP files into the SSI using <!--exec cgi=file.php--> I tried it and it seems to work (I tried including a poll into a blank HTML file. I put the PHP code required to include the poll into a php file, than included that php file into an SSI file), but it requires tweaking to PHP scripts and I'm not sure if it will work everytime..

Is there any other way I can do this? And if I were to rename all my .shtml files will I loose rank on Google et al?

Thank you.
royrules22 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 07-23-2005, 08:42 PM
chrishirst's Avatar
Super Moderator

Posts: 16,477
Location: Blackpool. UK
You could simply set your .shtml to parse as PHP.

Add .shtml to the AddHandler line for php in .htaccess or httpd.cfg
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System | Bits & Bobs
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-23-2005, 09:20 PM
Novice Talker

Posts: 9
But will it slow down the server and/or use a lot of bandwith?
royrules22 is offline
Reply With Quote
View Public Profile
 
Old 07-23-2005, 09:25 PM
brokensoul2271's Avatar
- - - - - - - - -

Posts: 750
Location: Lancashire, UK
Don't think it will make a difference...?
__________________
Yes, indeed...
WebDevWorld.net | StrangeDarkness.com | MyNEWBlog
brokensoul2271 is offline
Reply With Quote
View Public Profile Visit brokensoul2271's homepage!
 
Old 07-23-2005, 09:37 PM
chrishirst's Avatar
Super Moderator

Posts: 16,477
Location: Blackpool. UK
It does add a small overhead, but unless you are talking about thousands of connections an hour it is insignificant in the overall picture.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System | Bits & Bobs
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-23-2005, 10:03 PM
Novice Talker

Posts: 9
Well as of last count I have about 200-300 hits daily and about 100 pages with the .shtml extensions (it will grow of course) which I need parsed. So will it make a difference?

And lastly two more questions: What is the exact code to add to the .htaccess file? And secondly is there any way I can test this out in one directory before I apply it to the root. Like for example I want to have a dir called www.site.com/testing and any file placed in testing will have this parsing thing apply but no other file. Than when I feel I've tested enough I want it to apply to the whole site. Is it possible?
royrules22 is offline
Reply With Quote
View Public Profile
 
Old 07-23-2005, 11:02 PM
WaHoOoO!'s Avatar
Mentally Unstable Tugboat Captain

Posts: 797
Name: Chad
Location: /usr/bin/perl
I *think*...

AddHandler application/x-httpd-php .shtml
__________________
He's baaaaaaaack....
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
Reply     « Reply to PHP & SSI: Parsing & File Extensions Question
 

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