Subdomain to TLD (.htaccess problem)

sanusense

Active member
Joined
Aug 28, 2013
Messages
72
Best answers
0
Ratings
12
Points
0
#1
Anybody can assist me ?
I have a site name example.eu5.org and wanna change the name to Example.NET

I have no idea of .htaccess, how to write it properly???

Please let me know how to create or make me one ! Send it to PM or in comments.

Thanks!
 
Joined
Dec 23, 2012
Messages
29
Best answers
0
Ratings
1
Points
0
#2
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]
 
Joined
Jul 11, 2014
Messages
8
Best answers
0
Ratings
1
Points
0
#3
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
1,898
Replies
11
Views
3,381
Replies
5
Views
2,101
Replies
4
Views
2,210
Newer Threads
Replies
7
Views
2,980
Replies
5
Views
3,050
Replies
2
Views
2,385
Latest Threads
Replies
0
Views
15
Replies
1
Views
28
Replies
4
Views
76
Recommended Threads
Replies
20
Views
2,480
Replies
0
Views
168
Replies
1
Views
810
Replies
9
Views
3,204

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

Tag Cloud

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