我希望请求http://user1.domain.com:
- 从http://www.domain.com/site-client/site.php?site=user1返回输出
- 并且用户仍然在浏览器中看到 URL 'http://user1.domain.com'
现在我有以下.htaccess:
RewriteEngine On
RewriteBase /
# Protect the htaccess file
<Files .htaccess>
Order Allow,Deny
Deny from all
</Files>
# Disable directory browsing
Options All -Indexes
RewriteCond %{HTTP_HOST} !^www.domain.com
RewriteCond %{HTTP_HOST} !^admin.domain.com
RewriteCond %{HTTP_HOST} ([^.]+).domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/site-client/site.php?site=%1 [L]
成功调用http://www.domain.com/site-client/site.php?site=user1 URL,但它显示给用户。我怎样才能避免这种情况?