1

I have a redirect apache server that I setup for about 30 domains. I want to have all requests get redirected to the main server except for 1 domain.

Basically any domain coming to this server gets forwarded to www.maindomain.com; however, I'd like domain234.com and www.domain234.com to get forwarded to https://www.site.com

I found this response and tried it but had no success:

    <VirtualHost _default_:80>
        RewriteCond %{HTTP_HOST} ^(.*)$
        RewriteRule ^(.*)$ https://www.maindomain.com [R=permanent,L]
    </VirtualHost>

    <VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName domain1.com
        ServerAlias www.domain1.com
        ServerAlias domain2.biz
        ServerAlias domain3.info
        RewriteEngine on
        RewriteCond (.*) https://site.foo.com [R=301,L]
    </VirtualHost>

Anyone have suggestions for me to fix this issue?

ajburch
  • 11
  • 2

0 Answers0