Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>I'd like to redirect all of my old site links from <strong><em><code>http://artygirl.co.uk/</code></em></strong> to my new one <strong><em><code>http://brightmist.co.uk/</code></em></strong></p> </blockquote> <p>There are several ways to achieve that, all of them should be implemented in one .htaccess file in <code>http://artygirl.co.uk/</code> root directory.</p> <p>There is no need to check for the incoming domain as it must be <code>artygirl.co.uk</code>, where the .htaccess file is located.</p> <p>To use any of the following options, copy-paste the corresponding directive or rule-set into one <strong>empty</strong> .htaccess file in <code>http://artygirl.co.uk</code> root directory.</p> <hr> <p>The fastest one is a simple Redirect using one <code>mod_alias</code> directive:</p> <pre><code>Redirect 301 / http://brightmist.co.uk/ </code></pre> <p>Any path in the incoming URL will be appended automatically to the redirected URL.</p> <hr> <p>To redirect only certain paths using another <code>mod_alias</code> directive:</p> <pre><code>RedirectMatch 301 ^/(.*) http://brightmist.co.uk/$1 </code></pre> <p>Although this example redirects everything, the regex <code>^/(.*)</code> can be modified to match only certain URL-path pattern.</p> <hr> <p>To redirect only certain paths using <code>mod_rewrite</code> directives:</p> <pre><code>Options +FollowSymlinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) http://brightmist.co.uk/$1 [R=301,NC,QSA,L] </code></pre> <p>As in the previous option, although this rule-set redirects everything, the regex <code>^(.*)</code> can be modified to match only certain URL-path pattern.</p> <hr> <p><strong>NOTES</strong></p> <ul> <li><p>The same directory structure and files in <code>http://artygirl.co.uk/</code> must exist in <code>http://brightmist.co.uk/</code> for any of the previous options to work.</p></li> <li><p>If the actual .htaccess file in your question works as expected, you could use it in <code>http://brightmist.co.uk/</code> root directory where the new WP is installed. Might require some modifications, though.</p></li> <li><p>To move or copy a WP install, check this link <a href="http://codex.wordpress.org/Changing_The_Site_URL" rel="noreferrer">Changing the site URL</a>.</p></li> </ul> <hr> <h3>UPDATE:</h3> <p>From these sentences in your comment to this answer: "<em>My domains both point at the same directory...</em>" and "<em>...now it creates a loop...</em>", maybe the question is about domains pointing to the same content (Website), normally known as <code>parked</code> domains.</p> <p>If that's the case, I am not sure redirecting in .htaccess the primary domain to the parked one is the correct approach just to change the domain name in the browser's address bar. </p> <p>However, in theory something like this should do it using mod_rewrite directives:</p> <pre><code>Options +FollowSymlinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} artygirl\.co\.uk [NC] RewriteRule ^(.*) http://brightmist.co.uk/$1 [R=301,NC,QSA,L] </code></pre> <p>Redirects permanently any request from <code>http://artygirl.co.uk</code> to <code>http://brightmist.co.uk</code>, appending the complete incoming path and query when present.</p> <p>Since the .htaccess file is also shared, I think this rule-set should be placed at the top of the .htaccess file in the question, replacing the following lines:</p> <pre><code>RewriteEngine On RewriteBase / </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload