Subdomain to TLD (.htaccess problem)

web3k

New member
Joined
Dec 23, 2012
Messages
39
Points
0
So you want to redirect example.eu5.org to Example.NET?

This example will redirect example.eu5.org, and any 'specific page' to Example.NET:

E.g.
http://example.eu5.org -> http://example.net
http://example.eu5.org/page1.htm -> http://example.net/page1.htm
http://example.eu5.org/page2.htm -> http://example.net/page2.htm

Note: This method will produce a 404 if a page/file exists on example.eu5.org and not onexample.net

Add to .htaccess:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.eu5.org [NC]
RewriteRule ^(.*)$ http://example.net/$1 [L,R=301]
 

ironcladservers

New member
Joined
Jul 11, 2014
Messages
18
Points
0
As posted above, you can redirect using the above information. This implies that you have the new domain already setup and running.

If you're looking to "change" the domain though, and not do a redirect, you'll actually need to register that domain, and point it to the proper nameservers and add the proper values on the hosting service as well, in other words is not accomplished using .htaccess file.
 
Older threads
Replies
5
Views
3,414
Replies
7
Views
5,806
Replies
11
Views
5,667
Replies
28
Views
11,425
Newer threads
Latest threads
Replies
2
Views
133
Replies
1
Views
187
Replies
2
Views
231
Replies
1
Views
295
Recommended threads
Replies
29
Views
9,604
Replies
2
Views
3,722
Replies
4
Views
2,863
Similar threads

Latest postsNew threads

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top