logo
Ask your WordPress questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$20
Use HTML site URL's Recreated exactly on Custom Wordpress Site?

We have created a new custom wordpress site and design for a client.

Clients current site is an html site on a custom CMS and we have been performing SEO on his site for about a year and have many ranking keywords to specific URL's to the html (current site)

We are now ready to transfer the domain to the new wordpress site and I was wondering the following:

1. Is there a way to utilize (create the same URL's on the wordpress site as the html site) the exact same URL's that we've performed SEO and link building to his html site and create them on the wordpress site WITHOUT doing 301 redirects? Meaning, we want to preserve all of the current page content and URL's from the HTML site onto the wordpress site.

2. Do this WITHOUT 301 redirects

Of course all NEW content and URL's on the new wordpress site will have their own structure and SEO done to them so that is a non issue. We just want to make sure we preserve all SEO benefits to new wordpress site.

I've searched all over for solutions or plugins that allow to create fully custom URL's.

For instance, a plugin that would allow me to change the slug on the URL from:

wordpress version: client.com/locations/los-angeles

To:

client.com/locations/los-angeles.html (on the wordpress site)

Hopefully that makes sense.

Tyler



This question has been answered.

Tyler M | 12/01/11 at 9:09pm Edit


(4) Possible Answers Submitted...

See a chronological view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    12/01/11
    9:31pm
    Luis Abarca says:

    You can do that without plugins, just go to to Settings -> Permalink (/wp-admin/options-permalink.php) in your site and change your permalinks structure to something like this:

    /%postname%.html

    Check this example:
    http://e-acapulco.com/eventos/abierto-de-gimnasia-en-acapulco.html

    is using this permalink structure
    /%category%/%postname%.html

    Previous versions of this answer: 12/01/11 at 9:31pm

    • 12/01/11 9:44pm

      Tyler M says:

      I understand that, but what happens to the new wordpress pages we create? Everything will have to be in that structure right? OR can we control permalinks on a case by case basis?

      Follow me?

      There are about 80 URL's on the HTML site and we plan to build about 100 MORE pages on the wordpress site. We only need the custom URL's for the 80 URL's and then anything after that can just be standard wordpress with /%postname% permalink structure.

      Is this possible?

    • 12/01/11 9:50pm

      Luis Abarca says:

      All the url have a similar URL: /location/page.html ??

      You can create a custom post type to do that and edit the rewrite rules.

  • avatar
    Last edited:
    12/01/11
    9:54pm
    stevenjgoldman says:

    I agree that /%category%/%postname%.html/ as a permalink adds .html but only to blog posts and not to pages. There is a free plugin available from wordpress (dot) org called .html on pages Direct Link

    Hope this helps..

    Previous versions of this answer: 12/01/11 at 9:54pm

  • avatar
    Last edited:
    12/02/11
    1:22am
    Julio Potier says:

    I agree too : /%category%/%postname%.html/ as a permalink adds .html but only to blog posts and not to pages !

    Also, i know you don't want to use 301 but sometimes this is a good solution waiting google refresh the new links.

  • avatar
    Last edited:
    12/02/11
    5:04am
    John Cotton says:

    Tyler

    I really think you should be using 301 redirects - Google isn't going to punish your SEO for that because that's what 301 redirects are for. It's almost certainly worse to have two pages with the same content (your new WordPress page and a view of that page via a rewrite)....

    However, if you are dead set to do this, then this is how to do it:


    1/ Add the following code to your header.php file, just before </head>:


    <?php if ( is_singular() ) { ?>
    <link rel="canonical" href="<?php the_permalink(); ?>" />
    <?php } ?>


    2/ Add the following code to your theme functions.php file


    function my_add_rewrite_rules( $rules ) {
    $newrules = array();

    $newrules['^my-old-url-1$'] = 'index.php?p=212';
    $newrules['^my-old-url-2$'] = 'index.php?p=315';
    $newrules['^my-old-url-3$'] = 'index.php?p=72';
    // etc for each of your 80 urls where p=id points to the page/post id of the replacement page

    return $newrules + $rules;
    }
    add_action('rewrite_rules_array', 'my_add_rewrite_rules');


    3/ Change your permalinks to whatever you want (/%category%/%postname% is good), but DON'T .html in there - it's extra bytes, unnecessary and doesn't add anything to your SEO. Save Permalinks (even if you don't change them).

    Step 1 is important for telling Google (and others) which url is the REAL url - it should stop it penalising you for duplicate content.

    Step 2 rewrites each of the urls (you've only got 80 and you only need to do it once). p=ID works regardless of how you set your permalinks and gives you the flexibility to change permalinks at a later point.

    Step 3 executes the code in step 2.

    JC

This question has expired.



Gabriel Reguly, Tyler M voted on this question.



Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.