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.

Coding Forum


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



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

Posts: 9
Trades: 0
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
 
 
Register now for full access!
Old 07-23-2005, 08:42 PM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-23-2005, 09:20 PM
Novice Talker

Posts: 9
Trades: 0
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
Trades: 0
Don't think it will make a difference...?
__________________
Yes, indeed...

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
brokensoul2271 is offline
Reply With Quote
View Public Profile Visit brokensoul2271's homepage!
 
Old 07-23-2005, 09:37 PM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-23-2005, 10:03 PM
Novice Talker

Posts: 9
Trades: 0
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
Trades: 0
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 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.24842 seconds with 12 queries