Sub-domain --> Sub-domain
-
- New to forums
- Posts: 4
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Wed Dec 18, 2013 3:13 am
Sub-domain --> Sub-domain
How can I, if at all possible, redirect one sub-domain to another? For example.. http://website.com --> http://www.website.com
Re: Sub-domain --> Sub-domain
Redirecting one subdomain to another can be accomplished using a "forward" record on the domains tab, simply input the URL of the subdomain you're wanting to forward to. Based on your example, however, it appears you're wanting to redirect to include "www" in your URL at all times. If this is the case, a .htaccess rule would be more appropriate.
For this, you would create a .htaccess file inside of your public directory, and insert the following lines:
For this, you would create a .htaccess file inside of your public directory, and insert the following lines:
Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Re: Sub-domain --> Sub-domain
Thank you! That worked perfectly.