【问题标题】:Change url structure for all files in a folder using htaccess使用 htaccess 更改文件夹中所有文件的 url 结构
【发布时间】:2014-01-15 04:23:41
【问题描述】:

自从我们从 Joomla 2.5 更新到 Joomla 3.2 之后,URL 已经从:

示例: http://domain.com/blog/name-of-post.htmlhttp://domain.com/blog-name/entry/name-of-post

我的问题是如何重定向所有博客文章以具有新的 url 结构?什么是最好的方法,所以我不必一一去?

【问题讨论】:

    标签: .htaccess redirect joomla url-rewriting


    【解决方案1】:

    你只需要:

    RedirectMatch 301 ^/blog/(.+)\.html$ /blog-name/entry/$1
    

    在文档根目录的 htaccess 文件中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-09-17
      • 1970-01-01
      • 2020-08-22
      • 2019-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多