Subdomain redirect

Using a single web hosting account to host multiple sites

Subdomain redirect

Postby wwday3 » Wed Apr 29, 2009 11:59 pm

I've been trying (over and over) to set up a .htaccess redirect for a subdomain. Nothing I've tried so far seems to work. Here's what I need

woodworking.my-domain.com

redirected to

woodworking-power-tools.my-domain.com

And, of course, all the files under the subdomain, like

woodworking-power-tools.my-domain.com/article1

Help??
wwday3
 
Posts: 15
Joined: Wed Aug 29, 2007 10:18 pm

Postby richardk » Thu Apr 30, 2009 12:55 pm

What happens when you visit woodworking.my-domain.com?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby wwday3 » Thu Apr 30, 2009 1:41 pm

Not quite sure I understand the question. My website comes up? I want the new subdomain to pull up the same website...

Maybe I did not describe everything clearly. The current website is woodworking.my-domain.com. I'm "renaming" it to woodworking-power-tools.my-domain.com (I will rename the folder it's pointing to). I need to have the old links (woodworking) to point to the "new" subdomain (woodworking-power-tools).
wwday3
 
Posts: 15
Joined: Wed Aug 29, 2007 10:18 pm

Postby richardk » Fri May 01, 2009 10:56 am

Rename the directory.
Recreate the directory and put the following in a .htaccess file in it
Code: Select all
Redirect 301 / http://woodworking-power-tools.example.com/
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby wwday3 » Tue May 05, 2009 1:52 pm

[quote="richardk"]Rename the directory.
Recreate the directory and put the following in a .htaccess file in it
[code]Redirect 301 / http://woodworking-power-tools.example.com/[/code][/quote]

I had to think about it a bit, but it worked great. Thanks!
wwday3
 
Posts: 15
Joined: Wed Aug 29, 2007 10:18 pm


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 20 guests

cron