二级域名访问指定文件
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^.*$ - [NC,L] RewriteCond %{HTTP_HOST} ^admin. RewriteRule (.*) admin.php [NC,L] RewriteRule (.*) index.php [NC,L] </IfModule>
当访问域名 http://admin.* 时将访问 admin.php