1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Maintaining HTML files with PHP???

Discussion in 'Content Management' started by Dreamshop, Aug 24, 2005.

  1. #1
    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? :)
     
    Dreamshop, Aug 24, 2005 IP
  2. elkiwi

    elkiwi Active Member

    Messages:
    536
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    68
    #2
    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]
    Code (markup):
    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
     
    elkiwi, Aug 24, 2005 IP
    Dreamshop likes this.
  3. SEbasic

    SEbasic Peon

    Messages:
    6,317
    Likes Received:
    318
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Add this to the .htaccess file (If he's on apache)...
    Addtype application/x-httpd-php .html .htm
    Code (markup):
    It means that the server will treat thml files as php.
     
    SEbasic, Aug 24, 2005 IP
    Dreamshop likes this.
  4. Dreamshop

    Dreamshop Peon

    Messages:
    1,026
    Likes Received:
    84
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yay! Thanks folks!


    PS: "2 Days" until???? ....until you make lemon bars? :p
     
    Dreamshop, Aug 24, 2005 IP
  5. elkiwi

    elkiwi Active Member

    Messages:
    536
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    68
    #5
    2 days until I get out of the sand box which smells really bad?
     
    elkiwi, Aug 24, 2005 IP