Page 1 of 1
Quesion about a website: how they generate all html pages
Posted: Thu Sep 07, 2006 12:48 am
by vnwebworld
Hi all,
While doing a project, I found a website with strange design:
http://products.kaonsoftwares.com/price-comparison/
All pages are in .htm files but it runs using PHP/MySQL. For example:
Softwares :
http://products.kaonsoftwares.com/price ... twares.htm
Desktops :
http://products.kaonsoftwares.com/price ... sktops.htm
Anybody knows how it works and what the advantages are? Is there any tutorial about this?
Thanks for viewing guys!
Posted: Thu Sep 07, 2006 12:55 am
by alex.barylski
Edit: It's possible they use PHP to generate HTML static pages...
Probably using Apache mod_rewrite
No real advantage, unless you subscribe to the fact that hackers won't figure out your using PHP so they remove you from their checklist of potential attacks...
That and some SEO experts claim Google, etc prioritize HTML files over PHP extensions...
Not sure about the latter though

Posted: Thu Sep 07, 2006 2:06 am
by vnwebworld
I see.
Thanks for your reply Hockey. Yeah, my client also said that his SEO told him to do like that to make it friendly to Search Engine.
Anybody knows if it is true or not? And any other advantages?
Cheers!
Posted: Thu Sep 07, 2006 4:50 am
by matthijs
I have no evidence but I can not imagine the main search engines prefer html over php. Why would they do that? Almost half the internet is php. Would be silly if they placed the php pages lower, considering there might be a lot of valuable content on them (hint hint).
More important can be if you use strings in your url's. Like product.php?yr=2005&p=167&id=198. Better would be to rewrite those to /2005/167/name-of-article
Posted: Thu Sep 07, 2006 6:04 am
by onion2k
Hockey wrote:That and some SEO experts claim Google, etc prioritize HTML files over PHP extensions...
Actually, it's more than a search terms in the URL increase your ranking. If your site has URLs like:
http://www.domain.com/product.php?id=1234
It's going to rank a lot lower than a site with URLs like:
http://www.domain.com/1234-Product-Title.html
Rewriting the URL to get keyword in is a very good idea. The theory behind the changing of the extension from PHP to HTML is that search engines believe static content is more likely to be relevant than dynamic content. I'm 100% sure that Google know how to rewrite URLs, so they'll know the extension is meaningless, but still.. it doesn't hurt to do it anyway just in case.
Posted: Thu Sep 07, 2006 8:51 am
by Obadiah
a really simple explanation is it could be include pages...kinda like what you could create if you had some iis frontpage extentions
Posted: Thu Sep 07, 2006 9:00 am
by Jenk
(Apache) httpd.conf
Code: Select all
AddType application/x-httpd-php .php .html .htm
Posted: Thu Sep 07, 2006 9:27 am
by Chris Corbyn
Off-topic but you can actually have a PHP app which "caches" pages to .htm files. In this case you centralise functionality for creating hyperlinks to check your cache and use .htm if it's available. You then have the original web page (.php) generate a cached version if the cache is older than a set time.
This isn't what you're referring to but I thought it was worth a mention

Posted: Tue Sep 19, 2006 5:04 am
by panic!
I've never been able to find mod rewrite written in a clear concise way, hope this helps:
make sure LoadModule rewrite_module modules/mod_rewrite.so is uncommented in your httpf.conf file so
Code: Select all
[b]#[/b]LoadModule rewrite_module modules/mod_rewrite.so
should be (no harsh/pound sign) at the start of the line:
Code: Select all
LoadModule rewrite_module modules/mod_rewrite.so
then add
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule /product/(.*)/(.*)/ /product.php?id=$1&id2=$2
</IfModule>
http://www.server.com/product/this_beco ... ecomes_$2/
if you enter
http://www.server.com/product/1234/ice_cream_machine/
the server looks up
http://www.server.com/product.php?id=12 ... am_machine
remember to make all your images, style sheets etc absoloute because the browser will look for them in
http://www.server.com/product/1234/ice_cream_machine/ and that's not even a real directory.
Hope that helps.
-Robin