WordPress.org

Ready to get started?Download WordPress

Forums

Best way to handle change of address and 301 (3 posts)

  1. atmasphere
    Member
    Posted 6 years ago #

    I am interested in moving my blog from atmasphere.net/wp to just atmasphere.net

    I know I can change the path in the control panel and get the appropriate code to change the .htaccess file if I need to do it manally thanks to the codex - http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory. What's the best way to make sure this update is correctly (and as quickly as possible) modified within the search engines? I know it's a permanent 301 redirect, but have no real idea how to do it.

    Thanks!

  2. iscifi
    Member
    Posted 6 years ago #

    using the .htaccess file on the web server
    You can edit this file using the permalinks function from wp-admin as well.

    example below:

    /
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On

    # redirect any url with /wp in it to main site
    Redirect 301 /wp http:/www.atmasphere.net/
    # Change BASE url to / e.g. root of the web site!
    #RewriteBase /wp/
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Take care

  3. atmasphere
    Member
    Posted 6 years ago #

    Cool - thanks! I was just playing with a fresh install on something else and did not see any 301 reference. Good to see it here!

Topic Closed

This topic has been closed to new replies.

About this Topic