我想在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