全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
12
返回列表 发新帖
楼主: aaawww

求个301跳转代码

[复制链接]
 楼主| 发表于 2018-7-20 17:10:56 | 显示全部楼层
羞涩 发表于 2018-7-20 16:57
五楼代码里面的 defatult改成下面即可

(default|simple|fashion)

请问一下,具体要怎么写呢? 本人是个代码小白,不懂的了
发表于 2018-7-20 18:00:45 来自手机 | 显示全部楼层
rewrite ^/index_(default|simple|fashion)-(0-9)+-1.html$ /index_default-$2.html permanent;
 楼主| 发表于 2018-7-21 10:56:04 | 显示全部楼层
dvbhack 发表于 2018-7-20 18:00
rewrite ^/index_(default|simple|fashion)-(0-9)+-1.html$ /index_default-$2.html permanent;

非常感谢大佬的热心帮助!
大佬的代码看上去应当是可行的,但奇怪的是我怎么试也不行。
rewrite ^/index_(default|simple|fashion)-([0-9]+)-1.html$ /index_default-$2.html permanent;
后来我改了一下
rewrite ^/index_(default|simple|fashion)-([0-9]+)-1.html$ /index_default-$1-1.html permanent;
发现也是不行的。
那个www.aaa.com/index_simple-1175-1.html
就是死活不肯跳到www.aaa.com/index_default-1175-1.html 上面去,搞得都晕啦
发表于 2018-8-19 14:16:34 | 显示全部楼层
搞懂.htaccess,即可解决
发表于 2018-9-13 21:59:14 | 显示全部楼层
诶诶烦恼日烦恼
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-3-28 21:47 , Processed in 0.064366 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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