.htaccess实现子目录绑定二级域名

网站根目录新建.htaccess文件
 
RewriteEngine on
RewriteCond %{HTTP_HOST} ^man.51ask.org$
RewriteCond %{REQUEST_URI} !^/man/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /man/$1
RewriteCond %{HTTP_HOST} ^man.51ask.org$
RewriteRule ^(/)?$ man/index.html [L]

0 个评论

要回复文章请先登录注册