Need help? Check out our Support site, then

mod_rewrite htaccess to

  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 to -- to have all of my archive links redirect to the new site. software is installed here:

    I'm using the hyperlinking in WP 2.0.2, so I tried this:


    and I had no luck. Can anyone help?


  2. Just for reference, 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' is what we're suggesting. :)

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

    IIRC, it should actually be:

    RewriteRule ^/wp/(.*)$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/(.*)$1 [QSA,L]<br /> </IfModule><br /> # END WordPress

    the site i'm wanting to do this to is

  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: /

    So the final look should be?...

    # BEGIN WordPress<br /> <IfModule mod_rewrite.c><br /> RewriteRule ^/(.*)$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 (.*)$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 didn't have the year section in the path. Something like this:

    when it should have read

    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 (.*)$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