title: Redirecting certain URL to another in HTACCESS
body: <p>Ok, quite alot here. I've recently changed domain names and I need to redirect quite a few things. Firstly..</p>
  
  <p>All pages of </p>
  
  <p><a href="http://helloarchie.blue" rel="nofollow noreferrer">http://helloarchie.blue</a> (old domain) </p>
  
  <p>need to redirect to </p>
  
  <p><a href="http://helloarchie.co" rel="nofollow noreferrer">http://helloarchie.co</a> (new domain). </p>
  
  <p>So far only the homepage redirects set up through the cPanel.</p>
  
  <p>I also need to redirect all images with this URL:</p>
  
  <p><a href="http://kaye.at/img/" rel="nofollow noreferrer">http://kaye.at/img/</a></p>
  
  <p>to </p>
  
  <p><a href="http://helloarchie.co/img/" rel="nofollow noreferrer">http://helloarchie.co/img/</a></p>
  
  <p>Here's my htaccess currently.</p>
  
  <pre><code>Options -indexes
  
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  
  # Allow any files or directories that exist to be displayed directly
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  # Rewrite all other URLs to index.php/URL
  RewriteRule ^(.*)$ index.php?/$1 [L] 
  
  # RewriteCond %{HTTP_HOST} ^(www\.)?kaye\.at$
  RewriteRule ^(.+\.png|gif|pdf|jpg|doc)$ http://helloarchie.co/$1 [NC,L,R]
  &lt;/IfModule&gt;
  
  &lt;IfModule !mod_rewrite.c&gt;
  ErrorDocument 404 index.php
  &lt;/IfModule&gt;
  
  RewriteCond %{HTTP_HOST} ^www\.helloarchie\.co [NC]
  RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
  RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
  RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
  RewriteRule ^(.*)$ http://helloarchie.co/$1 [L,R=301]
  
  &lt;Files 403.shtml&gt;
  order allow,deny
  allow from all
  &lt;/Files&gt;
  </code></pre>