Home > Backend Development > PHP Tutorial > URL地址301重定向解决方案

URL地址301重定向解决方案

WBOY
Release: 2016-06-13 12:18:40
Original
1374 people have browsed it

URL地址301重定向
请问如何将下面的地址通过PHP 301永久重定向呢?
http://www.xxxx.com/guang/123456
重定向为http://www.xxxx.com/deal/123456

http://www.xxxx.com/index/cate/cid/1
重定向为http://www.xxxx.com/list/1
------解决思路----------------------
试试

<br />rewrite ^/guang(.*) /deal$1 last;<br />rewrite ^/index/cate/cid(.*) /list$1 last;<br />
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template