【问题标题】:Create page as subdomain without creating subdomain on server将页面创建为子域而不在服务器上创建子域
【发布时间】:2016-01-21 10:34:55
【问题描述】:

我的网站中有 URL,例如 http://example.com/test,我需要将此页面显示为子域,例如 http://test.example.com/。

我尝试了以下方法。

我在 htaccess 中设置了 redirect 301 规则,但这是重定向到主页 总是。 Redirect 301 /test http://test.example.com/

我使用了几个 wordpress 插件 wp subdomain revisited 和 Main category as subdomain 但没有运气所以也许它们是旧版本。

我已经设置了一个通配符子域 (*.subdomain.com),并且该文件夹设置为 public html 主根目录。

请帮忙。

【问题讨论】:

标签: php wordpress apache .htaccess redirect


【解决方案1】:

您需要在服务器和htaccess文件http://www.mediacollege.com/internet/server/apache/mod-rewrite/subdomains.html使用通配符子域功能

【讨论】:

  • 那么在服务器上创建通配符子域(*.example.com)还不够吗?
猜你喜欢
  • 2013-02-21
  • 1970-01-01
  • 1970-01-01
  • 2015-06-04
  • 2011-04-20
  • 1970-01-01
  • 2019-03-17
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多