Need advice - change html pages to php

Discussion in 'HTML & Website Design' started by geomark, Oct 26, 2006.

  1. #1
    I have a fairly large site with many html pages. I would like to add geotargeting to them so it seems I need to make them php pages. But then I have to redirect them all, a very large number of redirects to point to the php version of instead of the html.

    Is there a better way? If not, what is the impact of a large number of redirects?
     
    geomark, Oct 26, 2006 IP
  2. James'78'

    James'78' Guest

    Messages:
    323
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I would recomend backing up your content then installing something like phpnuke or phpplatinum. I can recomend someone if you would like, if so send a pm. I'm not a pro but I think it would be a logical solution. Please keep us posted on the solution you choose.
     
    James'78', Oct 26, 2006 IP
  3. geomark

    geomark Peon

    Messages:
    924
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Those are cms systems, right? How does using them get my html pages to php without redirecting each one of them? Do they automate it for me?
     
    geomark, Oct 26, 2006 IP
  4. AdamSee

    AdamSee Well-Known Member

    Messages:
    422
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    135
    #4
    Add this to your .htaccess file:
     AddType application/x-httpd-php .php .html
    Code (markup):
    Every html file will be parsed by the PHP parser first. If there's no PHP inside, nothing will happen, if there is, it will run that PHP.

    The alternative is a redirect from html to php, but I prefer the top solution.
     
    AdamSee, Oct 27, 2006 IP
    carl_in_florida likes this.
  5. Max99

    Max99 Active Member

    Messages:
    112
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    arggh man i wish i had known this before i did individual all my pages
     
    Max99, Oct 27, 2006 IP
  6. subhayu.in

    subhayu.in Active Member

    Messages:
    147
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    81
    #6
    I dont have so much idea...but i can show u a website which wasin html and now its in php.
     
    subhayu.in, Oct 27, 2006 IP
  7. geomark

    geomark Peon

    Messages:
    924
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Adding the type handler to .htaccess works great, thanks!

    I knew this technique already from the time I embedded a newsfeed in another site, but I forgot all about it. Thanks for the reminder.
     
    geomark, Oct 27, 2006 IP
  8. carl_in_florida

    carl_in_florida Active Member

    Messages:
    1,066
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    90
    #8
    This is why I love DP

    Thanks for this info. I don't need it right now but I never knew this. Rep to you!
     
    carl_in_florida, Nov 1, 2006 IP
  9. Eskarina

    Eskarina Guest

    Messages:
    608
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I don't understand all that parser redirect stuff :p

    ...but if you still need to convert html to php ---> this is a good tool & very quick & easy to work

    http://www.easyhtools.com/ehsdescription.html

    Please bear in mind I know nothing about php! but just incase this may be of some use - out of curiosity some months back I converted some html files with it, to php, and got a friend to see if the looked ok. and it worked great :)
     
    Eskarina, Nov 1, 2006 IP