【问题标题】:redirect .htaccess from folder to domain with parameters使用参数将 .htaccess 从文件夹重定向到域
【发布时间】:2016-11-19 01:08:37
【问题描述】:

我只需要将带参数的文件夹重定向到新域,例如:

来自

www.domain.it/en/page/2/products

www.domain.com/page/2/products

我是怎么做到的?

我试过了,但对我的 pourpose 不起作用:

RewriteCond $1 !/$
RewriteCond %{REQUEST_FILENAME}/en/ -d
RewriteRule (.+) http://www.domain.com/$1/ [R=301,L]

【问题讨论】:

    标签: .htaccess redirect


    【解决方案1】:

    您可以使用以下基于 mod-alias 的解决方案

    Redirect /en/ http://domain.com/
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-03-05
    • 2013-11-08
    • 1970-01-01
    • 2016-02-08
    • 2012-01-09
    • 1970-01-01
    • 2013-01-20
    • 1970-01-01
    相关资源
    最近更新 更多