我的网站有文档根〜/ public_html我试图使用htaccess组织多域/子域重定向。miltiple域名/子域名使用htaccess
可能的重定向逻辑:如果发现域/子域目录 - 执行重定向,否则抛出404错误。
可能的目录结构:
public_html/
.htaccess (main redirect router)
public_html/
domain-1/
application/
public_html/
.htaccess
public_html/
domain-2/
application/
public_html/
.htaccess
public_html/
domain-3/
application/
public_html/
.htaccess
public_html/
subdomain-1.domain-1/
application/
public_html/
.htaccess
public_html/
subdomain-2.domain-1/
application/
public_html/
.htaccess
你的帮助,深深赞赏。 谢谢。
这就是VirtualHosts的优点。 https://httpd.apache.org/docs/2.2/en/vhosts/ – wmk
不幸的是,根据我的主机限制,我无法访问apache设置。 – mosgaz
是否可以使用htaccess解决我的问题? – mosgaz