Forums

How to get around this very odd htaccess problem? (3 posts)

  1. WordpressChina
    Member
    Posted 1 year ago #

    I am moving my blog from the root into a directory (yes, I understand most people do it the reverse and move it from a directory into the root).

    If I use the standard htaccess of the following, it will redirect everything in the root to the new directory:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.*)$ http://www.xyz.com/blog/$1 [R=301L]]

    The above code works fine, but I have other non-Wordpress files in the root that I need to keep there. For example, I have www.xyz.com/aboutme.html that I want to keep there, but if I use the htaccess code above, it is now not available...

    How can I move my permalinks to the new directory gracefully while still retaining all the non-WP files in the root directory? The permalink structure I'm using, btw, is this:

    /%year%/%monthnum%/%day%/%post_id%-%postname%/

    Thanks for help!

  2. richarduk
    Member
    Posted 1 year ago #

    Try this plugin

    http://urbangiraffe.com/plugins/redirection/

    The guy who writes these plugins is very professional, and this was last updated August 5th 2008 so should work for latest WP

    Otherwise, there seem to be one or two 301 / redirect plugins around

    By far the easiest way.

  3. WordpressChina
    Member
    Posted 1 year ago #

    No... doesn't seem to work. It seems to only work in the dir with WP, but I want to redirect URLs that are first outside WP into WP... I installed this plugin and got all sorts of errors :(

Topic Closed

This topic has been closed to new replies.

About this Topic