Automatically appending ".php" to the end of the permalinks... (6 posts)

  1. energyco
    Posted 7 years ago #


    I've tried following the instructions for "Having your posts end in .html" under the "Using Permalinks" documentation, but it's not giving me the result that I need.

    Sure it works when I go to a page such as "http://www.site.com/page.php," but it looks like it just redirects the page to "http://www.site.com/page," which doesn't work out for me.

    Is there any way that I can hack it so it REALLY emulates a .php extension, instead of it just redirecting?

    The reason I need this is because I'm converting a site with a good page rank over to WordPress, and I want to confuse the search engines as little as possible.

    Thank you!

  2. moshu
    Posted 7 years ago #

    As far as I know it works only for posts, not for Pages.

  3. energyco
    Posted 7 years ago #

    I know that I can modify the .htaccess file to make up rules to automatically append the .php, but there is one big problem with that, and that's that I would have to use static or at least staticish links in my WordPress installation, instead of sweet php link codes like get_permalink(26);. And there's a WHOLE lot of them I'd have to change. :(

    I have no problem writing up a long .htaccess file to get the links to do what I want, but is there anyone that knows how I can edit the "get_permalink" function to get the correct link (ie http://www.site.com/page.php instead of http://www.site.com/?page_id=10 or http://www.site.com/parent/page/)?

    The code doesn't have to be pretty, I just can't think of any way to get it to do what I want.

    Any help is super appreciated!

  4. skipcollege
    Posted 7 years ago #

    Hello, I'm looking for this solution as well. Any luck in finding a working solution for this yet?


  5. Search Engines don't care about the extensions. Really. Having one extension or another will not change your pagerank one bit.

  6. Cailean
    Posted 7 years ago #

    just make sure you have 301 redirects in your .htaccess from the /oldpage.php to /newpage

    That will ensure that your PR follows to the new pages.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.