WordPress.org

Ready to get started?Download WordPress

Forums

Simple 301 Redirects
cannot redirect from main to sub directory (7 posts)

  1. jpcutler85
    Member
    Posted 2 years ago #

    I have a WP install on a main directory and I want to redirect some of these posts and pages to a WP install in a sub directory. How ever I can't seem to get it work. I have the plugin installed in the sub directory because the main directory is getting wiped clean.

    http://wordpress.org/extend/plugins/simple-301-redirects/

  2. scottnelle
    Member
    Plugin Author

    Posted 2 years ago #

    If you want to redirect from the main domain to the subdomain, you'll need to install the plugin at the main domain. If you're removing WordPress from the main domain, setting up permanent redirects in your .htaccess file is probably the way to go. Your web host should be able to help you with that.

  3. jpcutler85
    Member
    Posted 2 years ago #

    Thanks for the help. So I would add redirects to the .htaccess file that is currently in the sub domain? Or would I need to add a new .htaccess file to the main domain once its wiped clean?

  4. scottnelle
    Member
    Plugin Author

    Posted 2 years ago #

    You would want to add them to the main domain once it's wiped clean.

  5. jpcutler85
    Member
    Posted 2 years ago #

    Thanks :) When I then decide to install a fresh WP install in the main domain, it will create a new .htaccess file. Do I combine/merge this with the current one in there that has all the re-directs?

    I have contacted my web host however response is a bit slow. Do you have any resource for how to write these re-directs in an .htaccess file? I have 31 links I need to re-direct all together.

  6. scottnelle
    Member
    Plugin Author

    Posted 2 years ago #

    If you want the redirects to continue working you'll probably have to merge them into the file WordPress creates, unless it's smart enough to edit the existing file.

    Here's an ugly but useful page with information about adding your own redirects with .htaccess. http://www.isitebuild.com/301-redirect.htm

  7. jpcutler85
    Member
    Posted 2 years ago #

    Thank you again for your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic