全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 2882|回复: 5
打印 上一主题 下一主题

[Windows VPS] 301网址转发怎么写? 00000000000000000000000000000000000000000000000000

[复制链接]
跳转到指定楼层
1#
发表于 2014-1-2 21:03:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
50金钱
本帖最后由 ZZPPP.COM 于 2014-1-2 21:34 编辑
  1.   - regex_url: ^/b/1.html$
  2.     status_code: 301
  3.     location: http://www.gggg.com/baidu/xxoo.html
  4.   - regex_url: ^/b/52.html$
  5.     status_code: 301
  6.     location: http://www.avavav.com/baidu/avaaa.html
  7.   - regex_url: ^/b/13.html$
  8.     status_code: 301
  9.     location: http://www.555.com/baidu/index.html
复制代码


上面是BAE  上这么写的的  当初没备份。。..

NGINX 规则
rewrite ^/b/1.html(.*) http://www.ww.com/baidu/88.html$1 permanent;
rewrite ^/b/2.html(.*) http://www.dd.com/baidu/index.html$1 permanent;
rewrite ^/b/3.html(.*) http://www.aa.com/baidu/22.html$1 permanent;
rewrite ^/b/4.html(.*) http://www.xx.cc/baidu/baidu.html$1 permanent;


求APHche   

.htaccess 的规则怎么。 百度不给我绑定了 我要搬家了

最佳答案

查看完整内容

RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www.ww.com$ RewriteRule ^/b/1.html$ http://www.ww.com/baidu/88.html [R=301,L] RewriteRule ^/b/52.html$ http://www.avavav.com/baidu/avaaa.html [R=301,L] RewriteRule ^/b/13.html$ http://www.555.com/baidu/index.html [R=301,L] 再试试。
来自 2#
 楼主| 发表于 2014-1-2 23:20:20 | 只看该作者
RewriteCond %{HTTP_HOST} ^zzppp.com$ [NC]
RewriteRule ^b/059.html$ http://zzpppyy.com/baiduapp.html [R=301,L]
RewriteCond %{HTTP_HOST} ^zzppp.com$ [NC]
RewriteRule ^b/0051.html$ http://zzppptv.com/baidu/bdaidu.html [R=301,L]
RewriteCond %{HTTP_HOST} ^zzppp.com$ [NC]
RewriteRule ^b/5.html$ http://zzpppang.com/baidu/indsex.html [R=301,L]
3#
发表于 2014-1-2 21:03:12 | 只看该作者
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.ww.com$
RewriteRule ^/b/1.html$ http://www.ww.com/baidu/88.html [R=301,L]
RewriteRule ^/b/52.html$ http://www.avavav.com/baidu/avaaa.html [R=301,L]
RewriteRule ^/b/13.html$ http://www.555.com/baidu/index.html [R=301,L]

再试试。
4#
发表于 2014-1-2 21:23:11 | 只看该作者
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^/b/1.html$ [NC]
RewriteRule ^(.*)$ http://www.gggg.com/baidu/xxoo.html [R=301,L]
RewriteCond %{HTTP_HOST} ^/b/52.html$ [NC]
RewriteRule ^(.*)$ http://www.avavav.com/baidu/avaaa.html [R=301,L]
RewriteCond %{HTTP_HOST} ^/b/13.html$ [NC]
RewriteRule ^(.*)$ http://www.555.com/baidu/index.html [R=301,L]


试试。。
5#
 楼主| 发表于 2014-1-2 21:34:32 | 只看该作者
贱人就是矫情 发表于 2014-1-2 21:23
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^/b/1.html$ [NC]

不对。没有效果
6#
发表于 2014-1-2 21:48:19 | 只看该作者
或者这个

<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
Redirect permanent ^/b/1.html http://www.ww.com/baidu/88.html
Redirect permanent ^/b/52.html http://www.avavav.com/baidu/avaaa.html
Redirect permanent ^/b/13.html http://www.555.com/baidu/index.html
order deny,allow

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-12-26 20:17 , Processed in 0.155627 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表