【问题标题】:How to achieve sub-directory sites in wordpress multisite?wordpress多站点中如何实现子目录站点?
【发布时间】:2016-08-16 20:09:09
【问题描述】:

我有一个启用了网络管理员的 wordpress 设置。 而且我配置了以下不同的站点。

http://example.com/ipl ,
http://example.com/cricket,
http://example.com/football,
http://example.com/ileague,
http://example.com/sports

但我要配置的是以下不重定向(地址栏中的URL不应更改)

http://example.com/sports/cricket 应该提供来自 http://example.com/cricket http://example.com/sports/cricket/ipl 应该提供来自 http://example.com/ipl 的内容 http://example.com/sports/football 应该提供来自 http://example.com/football 的内容 http://example.com/sports/football/ileague 应该提供来自 http://example.com/ileague 的内容

【问题讨论】:

    标签: wordpress .htaccess multisite


    【解决方案1】:

    请在 .htacess 文件中添加以下代码。

    RewriteRule ^sports/cricket/ipl?$ /ipl [NC]
    RewriteRule ^sports/cricket?$ /cricket [NC]
    RewriteRule ^sports/football/ileague?$ /football [NC]
    RewriteRule ^sports/football?$ /football [NC]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-15
      • 2016-07-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-21
      相关资源
      最近更新 更多