【问题标题】:Redirections in apacheapache中的重定向
【发布时间】:2015-10-13 08:45:52
【问题描述】:

我正在尝试在 .htaccess 文件中执行以下永久重定向,但我无法使它们工作。你能帮帮我吗?

非常感谢。问候!

重定向是这样的:

http://www.example.com/?_escaped_fragment_=cavite-multi-channel-office/c1g7x

to 

https://www.example.com/insurance-ph/contact-us/branches/cavite.jsp

【问题讨论】:

    标签: apache .htaccess mod-rewrite redirect query-string


    【解决方案1】:

    由于您想根据查询字符串进行重定向,我想您可以在这里找到答案:How to redirect URLs based on query string? :)

    所以在你的情况下,你会得到类似的东西:

        RewriteCond %{QUERY_STRING}  ^_escaped_fragment_=cavite-multi-channel-office/c1g7x$
        RewriteRule (.*)  https://www.example.com/insurance-ph/contact-us/branches/cavite.jsp  [R=301,L]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-04
      • 1970-01-01
      • 2014-02-23
      • 2016-12-16
      • 2014-04-16
      • 2014-10-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多