Forums

Moving the site within a domain and 301 redirect in .htaccess (1 post)

  1. peopledroptheguns
    Member
    Posted 8 months ago #

    Hi friends!

    The situation is as follows:
    There are two sites on the hosting.
    One was in the root directory and the second in the subdirectory example - http://domain1.com and http://domain1.com/subfolder
    Site from the root directory has been moved to another domain - http://domain2.com this is no problem.

    Now the second site must be moved to the root folder of domain - http://domain1.com
    or as described here http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory - indicate that the site is located at http://domain1.com

    The question of how to do given the fact that we need to implement a redirection of existing external links?
    Example: http://domain1.com/subfolder/xxx/xxx redirected to http://domain1.com/xxx/xxx
    i was searching in google, spoke to the hosting provider and even tried - so far no results.

    How can i implement it and with which rules in .htaccess, but without the experience and understanding in this case?
    .htaccess in the subfolder looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /subfolder/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /subfolder/index.php [L]
    </IfModule>

    # END WordPress

    I would like to solve the problem and come to a deeper understanding of the case.
    I would appreciate any help, thanks in advance!

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 8 months ago by peopledroptheguns
  • This topic is not resolved
  • WordPress version: 3.2.1