【问题标题】:htaccess how to redirect just the root not other pageshtaccess如何仅重定向根而不是其他页面
【发布时间】:2012-08-21 05:10:52
【问题描述】:

我在 htaccess 中遇到问题,我只需要重定向根站点(主页),而不是将流量重定向到其他页面。

例子:

主域:www.misite.com(重定向到另一个.com)

来自 http 的请求:www.misite.com/?other-page(不重定向)

来自 http 的请求:www.misite.com/?another-page(不重定向)

我只是将所有流量从www.misite.com / misite.com 转移到其他地方,而不是其他页面、内部等。

谢谢!

【问题讨论】:

标签: .htaccess redirect


【解决方案1】:

在 misite.com 站点的 htaccess 或 vhost 配置中使用 mod_alias。

RedirectMatch 301 ^/$ http://another.com/?

【讨论】:

    猜你喜欢
    • 2022-01-14
    • 2020-06-24
    • 1970-01-01
    • 2020-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多