【问题标题】:How do I convert this IIS URL Rewrite Rule for .htaccess Apache?如何为 .htaccess Apache 转换此 IIS URL 重写规则?
【发布时间】:2014-01-05 23:59:12
【问题描述】:

如何为 .htaccess Apache 转换此 IIS URL 重写规则?

<rule name="View Trades/Wants">
                    <match url="^([^]+)/PD([^]+)/" />
                    <action type="Rewrite" url="trade.php?type={R:1}&amp;id={R:2}" />
                </rule>

【问题讨论】:

    标签: apache .htaccess iis url-rewriting web-config


    【解决方案1】:
    RewriteRule ^([^]+)/PD([^]+)/ /trade.php?type=$1&id=$2 [L]
    

    如果您还没有打开重写引擎,请确保打开:

    RewriteEngine On
    

    【讨论】:

    猜你喜欢
    • 2011-04-25
    • 2014-07-03
    • 2020-03-08
    • 1970-01-01
    • 2014-06-30
    • 2016-08-09
    • 2012-08-22
    • 2016-01-02
    • 2013-10-14
    相关资源
    最近更新 更多