[英]301 redirect old url to new in mobile website
I need to redirect the old urls to the seoed urls in the mobile version of the website which is located at http://www.domain.com/mobile/
and has its own .htaccess
file with the following rewrite rules: 我需要将旧网址重定向到网站的移动版本中的seoed网址,该网站位于
http://www.domain.com/mobile/
并且具有自己的.htaccess
文件,并具有以下重写规则:
RewriteRule ^browse-(.*)-videos.html$ category.php?cat=$1
RewriteRule ^browse-(.*)-videos-([0-9]+)-(.*).html$ category.php?cat=$1&page=$2&sortby=$3
How can i 301 redirect the old urls to new ones? 301如何将旧网址重定向到新网址?
Have it this way: 有这种方式:
RewriteEngine On
RewriteBase /mobile/
RewriteCond %{THE_REQUEST} /category\.php\?cat=([^\s&]+)\s [NC]
RewriteRule ^ browse-%1-videos.html? [R=302,L,NE]
RewriteRule ^browse-(.*)-videos.html$ category.php?cat=$1 [L,QSA,NC]
RewriteRule ^browse-(.*)-videos-([0-9]+)-(.*).html$ category.php?cat=$1&page=$2&sortby=$3 [L,QSA,NC]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.