时光静好,与君语;细水流年,与君同;繁华落尽,与君老……
🌐 Paulblog 📅 2008 — 2026

linux服务器用nginx做网站内页之间301的跳转方法

✍ 作者 gbl 📅 2019-12-10 📂 👁 175 阅读

例:

要将这个页面 /topic/show-228-1.html 做301跳转到 /dance/topic-show-228-1.html

 

nginx的伪静态规则就这样写:

rewrite ^/topic/show-([0-9]+)-1.html$ /dance/topic-show-$1-1.html permanent;


暂无标签

评论

暂无评论...
验证码 换一张
取 消