【问题标题】:Apache mod_rewrite to catch XML requestsApache mod_rewrite 捕获 XML 请求
【发布时间】:2010-09-14 16:39:26
【问题描述】:

如何创建一个 apache RewriteRule 来捕获任何以 .xml 结尾的请求 URL,剥离 .xml 并将其传递给特定脚本?

http://www.example.com/document.xml, becomes http://www.example.com/document passed to script.php

【问题讨论】:

    标签: apache mod-rewrite


    【解决方案1】:

    我相信这应该可以解决问题。

    RewriteRule ^(.+)\.xml$ script.php?path=$1
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-15
      • 1970-01-01
      • 2021-07-15
      • 2021-06-08
      • 1970-01-01
      • 1970-01-01
      • 2020-09-24
      相关资源
      最近更新 更多