Redirect test(dot) to www(dot)

All you need to do for this is simply to create the subdomain required and create two files. The code within the files are below.



RewriteEngine on

RewriteCond %{HTTP_HOST} ^$ [OR]

RewriteCond %{HTTP_HOST} ^$

RewriteRule ^/?$ “http\:\/\/yourdomain\” [R=301,L]


ErrorDocument 404 /notfound.php




header(‘HTTP/1.1 301 Moved Permanently’);




The following two tabs change content below.

Shane Richardson

Web Developer / Admin at HL Training Services
I have worked at various companies developing E-Commerce websites, and am keen to improve my developing skills. I also enjoy networking and maintenance. I graduated from University of the West of England and achieved a 2:2 in BSc Computing.

Latest posts by Shane Richardson (see all)