Home > Backend Development > PHP Tutorial > seo : 301重定向解决思路

seo : 301重定向解决思路

WBOY
Release: 2016-06-13 12:04:04
Original
1032 people have browsed it

seo : 301重定向
比如一个网页 存在两个网址 (例如  www.x.com/you_10_1   和    www.x.com/you_10)都指向它。

现在需要将 www.x.com/you_10_1 使用301重定向到 www.x.com/you_10,请问怎么实现。


------解决方案--------------------
框架有自己的rewrite,直接寫會有衝突,需要你寫在框架的rewrite之前。

<br /><IfModule rewrite_module><br />RewriteEngine on<br />RewriteCond %{REQUEST_FILENAME} !-d<br />RewriteCond %{REQUEST_FILENAME} !-f<br />RewriteRule ^you_10$ http://www.x.com/you_10_1 [R=301,L]<br /></IfModule><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