【发布时间】:2013-09-11 00:15:49
【问题描述】:
我正在尝试使用 .htaccess 和通配符子域实现解决方案,以便
http://subdomain.example.com 映射到http://example.com/index.php/accounts/subdomain/。我的规则如下所示:
RewriteCond %{HTTP_HOST} !www.example.com [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).example.com [NC]
RewriteRule ^(.*/) /index.php [PT,L]
哪个有效,但忽略其他所有内容。当我尝试将任何内容附加到规则时,例如:
RewriteRule ^(.*/) /index.php/hello [PT,L]
我收到 500 内部服务器错误。我如何让它发挥作用?
【问题讨论】:
标签: .htaccess