【问题标题】:remove file from url with urlrewritefilter使用 urlrewritefilter 从 url 中删除文件
【发布时间】:2012-04-18 22:55:30
【问题描述】:

我有一个类似www.foo.com/start/rewrite.php/home/say/index的网址

如何使用 UrlRewriteFilter 从该 URL 中删除 rewrite.php,例如

www.foo.com/start/home/say/index

我认为 mod_rewrite 可以使用

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^/start/rewrite.php/?(.*) /$1 [R=301,L] 

谁能帮忙?

【问题讨论】:

    标签: url-rewriting tuckey-urlrewrite-filter


    【解决方案1】:

    这可以工作:

    <rule>
        <from>^(.*)/(rewrite.php)/(.*)$</from>
        <to>$1/$3</to>
    </rule>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-18
      • 2013-10-04
      • 2015-06-23
      • 2021-07-19
      • 2015-07-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多