Libros de historia - Consolidation Loans - Cheap Flights - Repair Bad Credit - Free Ringtones

PDA

View Full Version : Maintaining HTML files with PHP???


Dreamshop
Aug 24th 2005, 1:51 am
I have a client site that desperately needs a product management database (everything is currently done manually, page by page). I have someone who can easily put the database together but it would require switching file names to php extensions.

Of course my client also has hundreds of number 1 serps and he wants ZERO downtime...so he's not happy about the idea of changing file names (even with a 301 redirect).


I've looked at a few shopping cart programs that will allow you to output html pages, so I know there's got to be a way to manage everything with the database and still utilize static pages. Can anyone tell me how this is done and what it entails?

What I'm trying to do is set this up so each page can list multiple products (one main product, and several cross-sell products), but without a shopping cart. I'll use the existing design and 'plug-in' the code which calls the products to the page. The site itself is just for generating leads, so we want to show products but we don't need shopping cart features.

I did find www.litecommerce.com which allows you to maintain html static pages based on the product name, but it has other limitations.


Anyone have some suggestions? :)

elkiwi
Aug 24th 2005, 2:22 am
You can keep the same page names by using mod rewrite.

I recently changed a static site to database/php and mod rewrote it so in affect, it looked exactly the same to the search engines.

The pages (or page - one php page now replaces 100's of static ones) are all php now but the apache server just changes the url to what ever you like.
There are other ways to do this but yes be very careful of changing urls.

here's an example:

the old html page was like this - 100_i.html (where 100 was the ref number of a property and "i" was the language)

RewriteRule ^([0-9]{3})_([aei])\.html$ /property_detail.php?REF=$1&ext=_$2 [L]

To keep the the same url - as all these pages were indexed by all the search engines, the above mod uses one page but takes the variable from the requested url and puts it into my dynamic php page and the correct data is served up.

My advise is research all the possibilities first as search engines don't like urls that change.

I'm sure someone else has more advise on this but this is how I tackled this problem

SEbasic
Aug 24th 2005, 2:31 am
Add this to the .htaccess file (If he's on apache)...
Addtype application/x-httpd-php .html .htm

It means that the server will treat thml files as php.

Dreamshop
Aug 24th 2005, 11:09 am
Yay! Thanks folks!


PS: "2 Days" until???? ....until you make lemon bars? :p

elkiwi
Aug 24th 2005, 1:12 pm
PS: "2 Days" until???? ....until you make lemon bars?

2 days until I get out of the sand box which smells really bad?