大家好。

我想创建一个 .htaccess 文件,如果我输入 subdomain.domain.com 我可以使用( subdomain )作为查询字符串和 domain.com 像域一样。

我可以得到帮助吗?:)

  • 坦克
有帮助吗?

解决方案

如果有人访问 hello.example.com,您希望它重定向到 example.com/?domain=hello。

请看一下 http://httpd.apache.org/docs/1.3/misc/rewriteguide.html, ,虚拟用户主机部分。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top