重定向所有未知域

时间:2016-06-20 12:27:19

标签: apache debian subdomain

我想在apache中重定向所有未知的子域名,你能帮帮我吗?例如:“aaa.mydomain.com / bbb.mydomain.com / ccc.mydomain.com”重定向到“all.domain.com”。

我现在的主持人:

>

    ServerAdmin me@gmail.com
    ServerName domain.dev
    ServerAlias administration.domain.dev
    ServerAlias agence.domain.dev
    ServerAlias css.domain.dev
    ServerAlias dev.domain.dev
    ServerAlias dome.domain.dev
    DocumentRoot /var/www/symfony/domain/web
    <Directory  /var/www/symfony/domain/web>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride all
            Order allow,deny
            Allow from all
            <IfModule mod_rewrite.c>
                    RewriteEngine On
                    RewriteCond %{REQUEST_FILENAME} !-f
                    RewriteRule ^(.*)$ /app.php [QSA,L]
            </IfModule>
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error_dev.domain.dev.log
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/access_dev.domain.dev.log combined

1 个答案:

答案 0 :(得分:0)

您可以使用反向代理执行此操作,请查看apache proxypass

相关问题