aaawww 发表于 2018-7-20 17:10:56

羞涩 发表于 2018-7-20 16:57
五楼代码里面的 defatult改成下面即可

(default|simple|fashion)


请问一下,具体要怎么写呢? 本人是个代码小白,不懂的了

dvbhack 发表于 2018-7-20 18:00:45

rewrite ^/index_(default|simple|fashion)-(0-9)+-1.html$ /index_default-$2.html permanent;

aaawww 发表于 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)-(+)-1.html$ /index_default-$2.html permanent;
后来我改了一下
rewrite ^/index_(default|simple|fashion)-(+)-1.html$ /index_default-$1-1.html permanent;
发现也是不行的。
那个www.aaa.com/index_simple-1175-1.html
就是死活不肯跳到www.aaa.com/index_default-1175-1.html 上面去,搞得都晕啦

artisan 发表于 2018-8-19 14:16:34

搞懂.htaccess,即可解决

alitime 发表于 2018-9-13 21:59:14

诶诶烦恼日烦恼
页: 1 [2]
查看完整版本: 求个301跳转代码