Adding .php to page URLs

Discussion in 'WordPress' started by dlm, Mar 22, 2010.

  1. #1
    Hi,

    I'm attempting to use WordPress to replace an existing site, but the problem is that there are many links on other sites (that I can't easily change) pointing to various pages of my current (non-Wordpress site) like: whateverdomain.com/cool-page-name.php

    From what I've seen, the best I could do with Wordpress would be whateverdomain.com/cool-page-name/ but this new page wouldn't get the benefit of the current inbound links (in Google's eyes), correct?

    So is there anyway to get a .php extension on my WordPress pages so that my existing inbound links on other sites will work?

    Thanks in advance.
     
    dlm, Mar 22, 2010 IP
  2. addlinkurl

    addlinkurl Well-Known Member

    Messages:
    2,409
    Likes Received:
    129
    Best Answers:
    0
    Trophy Points:
    155
    Digital Goods:
    1
    #2
    yes wordpress can do it.

    in wordpress admin panel, go to Settings/Permalinks and check "Custom Structure". write /%postname%.php in the field. save the changes. if wp can not create the .htaccess file, you should do it manually.
     
    addlinkurl, Mar 22, 2010 IP
  3. dlm

    dlm Peon

    Messages:
    3,123
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Awesome - thanks!

    I knew about %postname% but didn't know you could just add the .php on to the end.
     
    dlm, Mar 22, 2010 IP
  4. skabt

    skabt Banned

    Messages:
    285
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    123
    #4
    u can even add .html (this is how i trick my friend ) :)
     
    skabt, Mar 22, 2010 IP
  5. Smitten

    Smitten Well-Known Member

    Messages:
    779
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    148
    #5
    1) I'd do same as above, plus:

    2) Add the "permalinks redirect" plugin, just to be safe.

    3) Copy-paste all the previous website content as static pages, making sure titles remain the same (so links also do)

    It's funny how most people who favor blogs mistakenly focus on publishing "posts" and fail to take advantage of the "pages" feature as well. That's funny because using both features allows taking the best of both worlds!
     
    Smitten, Mar 23, 2010 IP
  6. williamsweb

    williamsweb Active Member

    Messages:
    2,016
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    75
    #6
    i am looking for the same..
    someone told me use "redirection" plugin... I don't want php on my posts, only on pages
     
    williamsweb, Mar 23, 2010 IP