<VirtualHost :80>
DocumentRoot "/study/data"
ServerName example.com
ServerAlias www.example.com
<Directory "/study/data">
Options Includes FollowSymLinks
AllowOverride All Options FileInfo
Order allow,deny
Allow from all
</Directory>
Alias /science-rsch /study/data/www/science
<Directory /study/data/www/science>
Options Includes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
RewriteEngine on
RewriteBase /science-rsch/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
</Directory>
<Directory /study/data/www/science/sites/default/files>
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
以上适用于www.example.com的alias / science-rsch :
www.example.com/science-rsch - &gt; /研究/数据/网络/科学
如何使上述虚拟主机*** * * 适用于具有Alias / content / science-rsch **的新ServerAlias(www.newdomain.com):
www.newdomain.com/content/science-rsch - &gt; /研究/数据/网络/科学