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.

mod_rewrite to make php show as html?

Discussion in 'Apache' started by cindos, Nov 22, 2005.

  1. #1
    I have a site that ranks and gets traffic, but unfortunately was designed rather poorly in html. I was hoping to redesign it in php using header and footer files so I could easily make changes to the design. If I rebuild the site in php using the same filenames, but with the .php extension instead of the .html can I use mod-rewrite to make the search engines go to the new .php pages rather than the old .html pages. I don't want to lose my rankings or traffic by making a switch and having duplicate content.

    I'm a complete newbie when it comes to mod_rewrite and all the stuff I've found online is confusing as hell. Any help with this would be really appreciated.
     
    cindos, Nov 22, 2005 IP
  2. Entelarust

    Entelarust Peon

    Messages:
    58
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    should be able to make a .htaccess file in the root with the following code

    AddType application/x-httpd-php .html
    Code (markup):
    this should enable you to add php to your existing html files and it should process those parts as php
     
    Entelarust, Nov 22, 2005 IP