• anon

    Not a very good solution at all! This is best done at the DNS level.

  • You don’t know how DNS works, do you?

  • Second example won’t work.

  • Thanks,

    not a DNS issue – & this works excellently.

    You saved me a heap of thumbing through Apache docs…

    I am not sure why the Redirect match needs to be in a separate container … but it does and you figured it out.

  • moz

    Thanks, but

    ServerName my-site.com
    ServerAlias *.my-site.com
    RedirectMatch permanent (.+)$ http://www.my-site.com$1

    It won’t work.

  • I think that simply creating a wildcard CNAME in the form of *.domain.com > http://www.domain.com would do the job too without having to patch the Apache config. At least for the purpose you were seeking.

Advertisment ad adsense adlogger