Subdomain 301 Redirection using .htaccess
I'm planning to post a lot more script, snipplets, whatever you called it. Mainly covering minisites, scraped pages, cycled pages, etc. Used properly, each of my post will help you making money. No guarantee. Period
So i pick a better name for my blog, and figure out that i need to redirect it to the new one. Here's the code i save it as .htaccess and put it on public_html/php folder:
-
RewriteEngine on
-
RewriteCond %{HTTP_HOST} ^php.fallenray.com$ [OR]
-
RewriteCond %{HTTP_HOST} ^www.php.fallenray.com$ [NC]
-
RewriteRule ^(.*)$ http://rainbowhatseo.fallenray.com/$1 [R=301,L]
My hosting use cPanel. It has the function to do this, but i simply doesn't satisfied with the result.
Above code will permanently (301) redirect from php.fallenray.com to rainbowhatseo.fallenray.com