【问题标题】:htaccess redirect for exact one domain namehtaccess 重定向到确切的一个域名
【发布时间】:2013-08-06 06:20:29
【问题描述】:

我的门户网站已移至另一个位置。所以我想将我的域名重定向到另一个位置

 RewriteRule .* http://check.site.local%{REQUEST_URI} [R,L]
 RewriteRule ^(.*)$ http://newcheckcheck.site.local$1 [R=permanent,L]

这对我来说非常有效。但是我的旧地方有一些网络服务。没有改变

 http://check.site.local/web_services/index.php

通过使用上述规则,这也改变为

 http://newcheck.site.local/web_services/index.php

如果有什么可以做的只是替换确切的域名。 提前致谢。

【问题讨论】:

    标签: .htaccess url-rewriting


    【解决方案1】:

    您可以在其他规则之前插入此规则

    # ignore rest of the rules if URI starts with /web_services/
    RewriteRule ^web_services/ - [L,NC]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-05-04
      • 2016-09-04
      • 2011-09-23
      • 2016-08-12
      • 2013-04-06
      • 2010-10-14
      • 1970-01-01
      相关资源
      最近更新 更多