Welcome! Log In Create A New Profile

Advanced

Rewrite wildcard subdomains to another wildcard subdomain

Posted by kuteninja 
Rewrite wildcard subdomains to another wildcard subdomain
October 06, 2009 04:11PM
I have 2 domains, let's say mydomain.com and mydomain.org

On the first one I previously hosted my site, but now I need to change it to .org, keeping the previous links.

I need that sub1.mydomain.com forwards to sub1.mydomain.org

eg:

sub1.mydomain.COM/something

will redirect me (301) to

sub1.mydomain.ORG/something

How can I change the domain but keep the subdomain there ?
I have wilcard subdomains (*.mydomain.com) on both of them, so using a rewrite for each subdomain is NOT an option, there has to be something with the "set" option, and some regexp... but... i dunno
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 101
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready