Sunday, January 16, 2011

Redirect from subfolder to subdomain

This should be simple right? I've tried a few solutions with no results...

How do I redirect:  

http://www.domainname.com/subdomain   and    http://www.domainname.com/subdomain/    

to: 

htt://subdomain/domainname.com   and   htt://subdomain/domainname.com/

~

What code should I use, and do I place it in .htaccess of the domainname.com root folder?

or in the subdomain folder?

Thanks so much!

JD

  • I'm presumming a typo in your request and that you wish to redirect:

    http://www.domainname.com/subdomain ----> http://subdomain.domainname.com

    If you are using apache, I'd use the following directive in the httpd.conf file:

    Redirect /subdomain http://subdomain.domainname.com
    
    mdpc : Here is the URI that describes the directive: http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect
    From mdpc
  • And if you're using IIS, set up redirects in the site properties in the IIS management snapin.

    From phoebus

0 comments:

Post a Comment