【发布时间】: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
如何创建一个 apache RewriteRule 来捕获任何以 .xml 结尾的请求 URL,剥离 .xml 并将其传递给特定脚本?
http://www.example.com/document.xml, becomes http://www.example.com/document passed to script.php
【问题讨论】:
标签: apache mod-rewrite
我相信这应该可以解决问题。
RewriteRule ^(.+)\.xml$ script.php?path=$1
【讨论】: