WordPress.org

Support

Support » Miscellaneous » Automatically appending “.php” to the end of the permalinks…

Automatically appending “.php” to the end of the permalinks…

  • Hello,

    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!

Viewing 5 replies - 1 through 5 (of 5 total)
  • As far as I know it works only for posts, not for Pages.

    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!

    skipcollege

    @skipcollege

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

    Thanks

    Moderator Samuel Wood (Otto)

    @otto42

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

    Cailean

    @cailean

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Automatically appending “.php” to the end of the permalinks…’ is closed to new replies.
Skip to toolbar