【发布时间】:2019-06-07 12:52:33
【问题描述】:
这和.htaccess rewrite subdomain to directory差不多
此解决方案有效:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^([^.]+)\.jcubic\.atthost24\.pl$
RewriteRule ^((?!subdomains/).*)$ /subdomains/%1/$1 [L,NC,QSA]
但我想转发但没有 /subdomains 目录所以
http://img.jcubic.atthost24.pl/.* 应为 http://jcubic.atthost24.pl/img/.*
这可能吗?这不起作用
RewriteRule ^((?!%1/).*)$ /%1/$1 [L,NC,QSA]
我不确定我有什么版本的 Apache。
【问题讨论】:
标签: apache .htaccess subdomain