【问题标题】:Redirect from page without parameters to page with parameters in htaccess从没有参数的页面重定向到在 htaccess 中有参数的页面
【发布时间】:2014-05-19 02:32:14
【问题描述】:

我需要从 www.site.ru/machines/ 这样的页面重定向到 .htaccess 的 mod_rewrite 部分中的页面 www.site.ru/machines/?set_filter=y&PRICE_MIN=4500。

【问题讨论】:

    标签: regex .htaccess mod-rewrite redirect parameters


    【解决方案1】:

    您可以在 root .htaccess 中使用此规则:

    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule ^(machines/)$ /$1?set_filter=y&PRICE_MIN=4500 [L,NC,R]
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-07-26
    • 2015-04-12
    • 1970-01-01
    • 2016-01-09
    • 1970-01-01
    • 1970-01-01
    • 2023-04-07
    • 1970-01-01
    相关资源
    最近更新 更多