Need help? Check out our Support site, then


mod_rewrite htaccess wordpress.org to wordpress.com

  1. I'm not sure if this is the right place to ask, but I figure it's worth a shot...

    I'm wanting to complete a move that I had from a site I hosted with wordpress.org to wordpress.com -- to have all of my archive links redirect to the new site.

    wp.org software is installed here: example.com/wp/

    I'm using the http://www.example.com/wp/2007/01/21/sample-post/ hyperlinking in WP 2.0.2, so I tried this:

    ReWriteRule http://www.example.com/wp/(.*) http://bofe.wordpress.com/$1

    and I had no luck. Can anyone help?

    Thanks!

  2. Just for reference, wordpress.org doesn't do hosting. (We're trying to get folks not to say that as it's causing confusion with other folks.) 'You're using the software from wp.org' is what we're suggesting. :)

    You do have RewriteEngine On in your htaccess file, right?

    IIRC, it should actually be:

    RewriteRule ^/wp/(.*) http://bofe.wordpress.com/$1 [QSA,L]<br />

    I hate doing rewrite rules.

  3. drmike,

    thanks for the clarification. giving it a try...

    didn't work.

    here's my .htaccess:

    # BEGIN WordPress<br /> <IfModule mod_rewrite.c><br /> RewriteRule ^/wp/(.*) http://bofe.wordpress.com/$1 [QSA,L]<br /> </IfModule><br /> # END WordPress

    the site i'm wanting to do this to is http://www.bofe.org/wp/

  4. also, just to let you know, with the suggested ReWriteRule, the old permalinks are giving me 404s.

  5. Where is this htaccess file in your directory structure anyway?

    If it's in the wp subdirectory, edit out the '/wp'

  6. the .htaccess file is here: /bofe.org/wp/

    So the final look should be?...

    # BEGIN WordPress<br /> <IfModule mod_rewrite.c><br /> RewriteRule ^/(.*) http://bofe.wordpress.com/$1 [QSA,L]<br /> </IfModule><br /> # END WordPress

  7. still getting 404s. thanks so much for your help with this issue.

  8. bofe,

    If you haven't figured it out yet, try this:

    <IfModule mod_rewrite.c><br /> RewriteEngine On<br /> RewriteRule (.*) http://bofe.wordpress.com/$1 [R=301,L]<br /> </IfModule>

    The only difference in my example is that I'm not using the circumflex nor the forward slash. Also, I'm using the R flag.

    I bet that the 404 error pages came up because the URL to your article on wordpress.com didn't have the year section in the path. Something like this:

    http://bofe.wordpress.com/01/21/sample-post/

    when it should have read

    http://bofe.wordpress.com/2007/01/21/sample-post/

    If this is the case, the code above should fix your problem.

    If for some reason you still get a 404, try adding this line:

    RewriteBase /wp/

    so your rules will read like this:

    <IfModule mod_rewrite.c><br /> RewriteEngine On<br /> RewriteBase /wp/<br /> RewriteRule (.*) http://bofe.wordpress.com/$1 [R=301,L]<br /> </IfModule>

    I tested both forms and they worked for me.

    Hope this helps

  9. I was close. :)

  10. woohoo!

Topic Closed

This topic has been closed to new replies.

About this Topic