Welcome to the Small Business Ideas Forum! We are a community of over 37,000 small business folks with over 87,000 posts for you to browse. We pride ourselves on being the friendliest forum you will find and we'd love to have you as a member of our community. Please take a moment and register for a free account. If you need any help, please contact Chris Logan.

Small Business Ideas Forum

Small Business Ideas Forum

A friendly place to share small business ideas and knowledge, ask questions, find help and encourage others that are involved in the small business industry. Topics include small business marketing, generating revenue and small business computing.

Go Back   Small Business Ideas Forum > Small Business Computing > Website Development
Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
Old 3rd August 2007, 03:36 PM   #1
Robert
Administrator
 
Robert's Avatar
 

Join Date: May 2004
Location: Houston, TX
Posts: 3,403

Default Parse .html Pages For Php Code

Ok, need to know if I'm opening up a can of worms . I know how to make changes to .htaccess file to get server to handle .html pages with php code.

I know static .html page will load faster but having php capabilities gives me the ability to add cool features without having to go in and rename the page from page.html to page.php

Other than the slight speed issue and probably a bit more load on the server, are there other issues I should worry about?

__________________
Small Business News - You've never seen small business news delivered like this!
Free Business Forms - Download free business forms you can customize
Robert is offline   Reply With Quote
Old 5th August 2007, 07:28 PM   #2
torka
Moderator
 
torka's Avatar
 

Join Date: Mar 2006
Location: Triangle area, NC, USA, North America, Earth (usually)
Posts: 1,583

Search Engine Guide Blogger

Default

None that I'm aware of right offhand. I do this for a couple of older sites of mine (originally coded in HTML, now using PHP, didn't want to have to change all those long-time "trusted" URLs). I haven't noticed any issues.

--Torka

__________________
Diane Aull - NineYards.com: Helping Businesses Do Business Online
Whether you think you can, or that you can't, you are usually right.
torka is offline   Reply With Quote
Old 5th August 2007, 08:16 PM   #3
Robert
Administrator
 
Robert's Avatar
 

Join Date: May 2004
Location: Houston, TX
Posts: 3,403

Default

Quote:
Originally Posted by torka View Post
I haven't noticed any issues.
Excellent.

__________________
Small Business News - You've never seen small business news delivered like this!
Free Business Forms - Download free business forms you can customize
Robert is offline   Reply With Quote
Old 13th August 2007, 02:04 PM   #4
StupidScript
Administrator
 
StupidScript's Avatar
 

Join Date: Jul 2004
Location: Los Angeles
Posts: 594
Default

Sorry for the late response ...
Quote:
Other than the slight speed issue and probably a bit more load on the server, are there other issues I should worry about?
Nobody will notice any difference in speed, Robert. If you have a VERY high-load server (~1M hits per day), you may be able to use a refined benchmarking application to detect the difference in delivery times, but they'll be on the order of microseconds. Otherwise, there are no noticeable differences in server performance when you include .html files in your PHP pre-processing. Torka's note is dead-on, too ... SEs won't even flinch, if your rankings were based on .html files that are now being parsed by PHP.

__________________
James Butler - "Do no weevils"
JamesButler.net
MusicForHumans.com
StupidScript is offline   Reply With Quote
Old 13th August 2007, 02:21 PM   #5
_detz_
VIP Contributor
 
_detz_'s Avatar
 

Join Date: Apr 2006
Posts: 268
Default

One thing some people have to worry about is security. Usually most things block people from posting php code or uploading php scripts but not html. If someone has access to upload html files or if you allow dynamic content(comments, etc..) that people can submit you might open up a security whole. Just something to keep in the back of your mind.

__________________
http://www.thevacantcubicle.com - The Vacant Cubicle

http://www.invoicejournal.com - Invoice your customers for free.
_detz_ is offline   Reply With Quote
Old 14th August 2007, 12:00 PM   #6
StupidScript
Administrator
 
StupidScript's Avatar
 

Join Date: Jul 2004
Location: Los Angeles
Posts: 594
Default

Excellent point, _detz_. Robert, don't abandon good user input validation techniques in your enthusiasm for converting the site. You probably don't want to allow .html uploads, or at least run any .html upload through basic PHP protection:
Code:
$upfile_content=htmlspecialchars(str_replace("$","",$upfile_content));
or similar.

__________________
James Butler - "Do no weevils"
JamesButler.net
MusicForHumans.com
StupidScript is offline   Reply With Quote
Old 14th August 2007, 04:20 PM   #7
Robert
Administrator
 
Robert's Avatar
 

Join Date: May 2004
Location: Houston, TX
Posts: 3,403

Default

Y'all totally rock! Thanks for the feedback.

Dumb question... would allowing blog comments expose us to problems? An example of what we are doing is here:

http://www.searchengineguide.com/sea...ws/010488.html

(scroll down to see the comment form)

We don't allow people to include html in their comments but we do have it set to automatically make URLs clickable.

__________________
Small Business News - You've never seen small business news delivered like this!
Free Business Forms - Download free business forms you can customize
Robert is offline   Reply With Quote
Old 15th August 2007, 04:46 PM   #8
StupidScript
Administrator
 
StupidScript's Avatar
 

Join Date: Jul 2004
Location: Los Angeles
Posts: 594
Default

Quote:
would allowing blog comments expose us to problems
As long as you treat those entries as user input (natch), you should be fine. I would suggest using the filters to remove/entitize PHP-like code, in addition to HTML code, like <? ?> for instance. (PHP's htmlspecialchars() works well for this, converting < et al. into the appropriate HTML entities.) The reason is that once the comment goes live, the PHP code would be live, too. Which brings me to a personal preference regarding URLs in posts; I'm not in favor of making them clickable. It does make it easier for others to get to a reference, but it also opens up spamming and malware doors. While interested people will still copy-and-paste the URLs into their browsers, spiders won't be tricked into visiting a p0wnt site. That's just my preference, though.

__________________
James Butler - "Do no weevils"
JamesButler.net
MusicForHumans.com
StupidScript is offline   Reply With Quote
Get Updates
RSS Feeds:
RSS Feed for Website Development RSS for this Category Only: Website Development

RSS Feed for Small Business Ideas Forum RSS for Entire Forum

Get Our Newsletter:
Receive our weekly digest of the best small business articles & discussions.

Forum Rules
Sponsor



Sponsor


More Info
Small Business News
Small Business Articles
Small Business Resources
Small Business Software
Small Business Opportunities
Small Business Loans
Glossary
Link To Us
Advertise
Newsletters
Small Business Brief Newsletter
Search Engine Marketing Newsletter
Ebooks
3 Little Things (and 1 Big Thing) to Create Winning Web Copy
Best Damn Web Marketing Checklist, Period!
Zero Dollars, a Little Talent and Thirty Days
Six Figure Blogging
Keyword Research Guide
The Step-By-Step Copywriting Course
Link Building Secrets
Drop Ship Wholesalers Directory
Destination Search Engine Marketing
E-Marketing Performance
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


Our volunteer moderators and their sites:
David Wallace
SearchRank - Organic Search Engine Optimization
Old Welsh Guy
Internet Marketing from Wales in the UK
thejenn
Search Engine Guide - The Small Business Guide to Search Engine Marketing
StupidScript
FraternityMed.com - Health, Illness and Wellness information for young people.
copywriter
Karon Thackston The Step-by-Step Copywriting Course & Learn Copywriting Directory
St0n3y
Search Marketing Results - Pole Position Marketing!
Search Marketing Info - (EMP) E-Marketing Performance
torka
NineYards.com: Helping Businesses Do Business Online
Karri
snap! virtual associates inc. - Internet marketing services for the progressive entrepreneur.
Matt McGee
Small Business SEM - Web marketing discussion for small businesses.
ChristineG
Free Online Marketing and Social Media Tips: Social Media Simplified for Small Business Owners
Logan
At Your Business - Forms & Online Help
Free Links - Free Advertising
Debra Mastaler
Alliance-Link
The Link Spiel Blog
Crimson Fox
Graphic Design and Brand Promotion and the Brand Design Blog

All times are GMT -6. The time now is 04:11 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 2004 - 2010 K. Clough, Inc.