trying to have a custom url that has a php extension

Discussion in 'WordPress' started by cscott5288, Feb 12, 2010.

  1. #1
    OK so here is the dilemma.

    I am moving my site to wordpress but I have a problem. One of my pages which has a particularly high search ranking has a .php extension at the end of it. So the page is like http://www.test.com/name.php. what I want to do is not have to use a 301 permanent redirect but instead have that very same URL in my new wordpress blog (so i don't have to use a redirect and lose PR juice). I know I can name a post address whatever I want, in so far as I don't add an extension. So I can do http://www.test.com/name but I cannot add the php extension! When I try to edit the URL in the post editor, it automaticall turns '.php' into '-php' as you know, to comply with url standards.

    Is there anyway I can have the EXACT same url by adding a .php at the end of the particular blog post I want so that it matches what the original page was?

    Thanks ahead ...
     
    cscott5288, Feb 12, 2010 IP
  2. waziuz

    waziuz Active Member

    Messages:
    783
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    80
    #2

    If you want to add a .php extension then you will need to add it to all post urls and you can do so by changing peralinks to remove the / at the end and adding .php instead

    But that would be a sitewide change and not only for that specific url but for all urls in your website. I have a lot of sites with .html extension with that trick and am quite sure .php will also work.
     
    waziuz, Feb 13, 2010 IP
  3. cscott5288

    cscott5288 Active Member

    Messages:
    912
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Yeah, I was aware of that trick. I was hoping I could just apply it to one post though.
     
    cscott5288, Feb 13, 2010 IP
  4. bob25

    bob25 Well-Known Member

    Messages:
    1,519
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    128
    #4
    Do you have the php page? Try uploading it by FTP and just create a link to it. It works with HTML pages. Don't do through Wordpress.

    yourdomain.com/page.php

    You can also create it in notepad and save it as a php file if you don't have it.
     
    bob25, Feb 13, 2010 IP
  5. cscott5288

    cscott5288 Active Member

    Messages:
    912
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Yeah, the thing is that I wanted to create unity with my site design and have it look like an actual blog post.
     
    cscott5288, Feb 13, 2010 IP