【问题标题】:Joomla 301 redirect index.php urls after sef-urlsJoomla 301 在 sef-urls 之后重定向 index.php url
【发布时间】:2017-03-18 00:52:55
【问题描述】:

我有一个 joomla 网站,我在该网站上打开了 sef-url。现在新的 url 和带有 index.php 的 url 正在工作: https://www.myurl.ch/index.php/team https://www.myurl.ch/team

我想将所有 index.php 网址重定向到非 index.php 版本,因此 /index.php/team 应该重定向到 /team。

如何在我的 .htaccess 文件中进行设置?

【问题讨论】:

    标签: .htaccess


    【解决方案1】:

    您可以使用以下规则:

    RewriteEngine on
    
    RewriteCond %{THE_REQUEST} /index\.php/(.+)\sHTTP [NC]
    RewriteRule ^ /%1 [NE,L,R=301]
    

    这会将 /index.php/foobar 重定向到 /foobar

    【讨论】:

      猜你喜欢
      • 2012-10-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-12
      • 2017-05-29
      • 2013-11-01
      • 1970-01-01
      相关资源
      最近更新 更多