开发者

htaccess 301 redirect

开发者 https://www.devze.com 2023-02-28 17:05 出处:网络
i used to have a wordpress blog and 开发者_StackOverflow中文版removed it. Now i have a lot of my old blog urls in Google search results. Here are a fre examples

i used to have a wordpress blog and 开发者_StackOverflow中文版removed it. Now i have a lot of my old blog urls in Google search results. Here are a fre examples

http://mywebsite.com/2011/01/3360
http://mywebsite.com/2011/06/3450
http://mywebsite.com/2011/02/3456
http://mywebsite.com/2010/01/3547
http://mywebsite.com/2010/02/2264

How can i redirect all dead urls that start with 2010 and 2011 in it. My htaccess file would get very long if i had to input each url into the htaccess file.


Have this rule in your .htaccess file:

RewriteEngine on
Options +FollowSymlinks -MultiViews

RewriteRule ^201[01]/ /my-new-page [R=301,L]
0

精彩评论

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