例如,所有这些地址:
http://hellothere.example.com/health/mental/depression
http://cats.example.com/health/mental/depression
http://dogs.example.com/health/mental/depression
http://www.batman.example.com/health/mental/depression
http://www.1.2.3.4.5.6.example.com/health/mental/depression将加载example.com/health/mental/depression
我正在尝试弄清楚如何使用htaccess来剥离example.com之前的任何东西,并将其替换为www。
任何帮助都将不胜感激!
发布于 2014-10-15 05:18:32
你不能用htaccess做到这一点。为此,方法是设置一个通配符dns记录,以便所有请求(*.example.com)都指向同一台服务器。
请参阅http://codex.wordpress.org/Configuring_Wildcard_Subdomains
https://stackoverflow.com/questions/26264790
复制相似问题