WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Permalinks To Match Static Site (6 posts)

  1. seomartin
    Member
    Posted 6 years ago #

    Hello,

    I am going to take a static XHTML site, and convert it to WordPress. What I cannot figure out is how to create the permalinks to match the existing URIs:

    http://german-shepherd-dogs.fiercestreetnetworks.com/resources/contact.php
    That is from the site. I've tried using:
    /%category%/%postname%/
    Which will work if I just create individual posts for each of the static pages existing, but I want to make them actual pages.

    Any suggestions?

  2. moshu
    Member
    Posted 6 years ago #

    When you use nice Permalinks, they are automatically created for the Pages, too.
    Like: example.com/page-title
    You could use parent/child pages to get:
    example.com/something/page-title

    However, for Pages you will not have permalinks ending in .php (or any other extension, for that matter)

  3. seomartin
    Member
    Posted 6 years ago #

    Thanks Moshu,

    So I basically create an empty page with the slug as "resources" (from my example above) - and then set the "page-title" page as a child of it?

    Also, will this work for the .php extension on on my files:
    (taken from: http://codex.wordpress.org/Using_Permalinks#Having_your_posts_end_in_.html)
    ============================================
    Tips and Tricks
    Having your posts end in .html

    There's an easy way to having your posts end in a .html extension, using the structure tags above. Following the example used on properly terminating permalinks, you could have a page like http://yoursite.com/2006/01/01/happy-newyear.html with this rule:

    /%year%/%monthnum%/%day%/%postname%.html

    Note that this does not generate actual .html files. It is only an illusion...
    ==========================================================
    This should work by changing .html to .php, correct?

  4. jrawle
    Member
    Posted 6 years ago #

    Having links ending with an extension is a little outdated now, a legacy of the way old static sites used to work.

    I'm going to move some old, static .php pages to WordPress soon, and I'll do so by creating WP pages with a matching name, but without .php for the permalink. Then I'll add a rule to my .htaccess that permanently redirects any requests for a .php page by stripping the extension off the end. Search engines will soon update, and you can leave the line in your .htaccess so that old external links continue to work.

    Something like:
    RewriteRule ^(.*).php /$1/ [R=301,L]

  5. seomartin
    Member
    Posted 6 years ago #

    Yes - thanks jrawle about that info. I do not use any extensions on my sites, other than this particular one.

    Reason why I want to keep the .php on "certain" pages on this site is due to PR being assigned to specific pages, and not just / (index.php files).

    Once I get the site up on WP, and have PR "showing" for those specific pages, (basically, once the transfer is "seamless"), then I'll remove the .php extension from some of the pages.

  6. seomartin
    Member
    Posted 6 years ago #

    Thanks for all the help you all! I've successfully completed the move.

    I'm using : /%category%/%postname%/ : with .htaccess 301 redirects.

Topic Closed

This topic has been closed to new replies.

About this Topic