开发者

New Google Images .htaccess redirect code

开发者 https://www.devze.com 2023-01-06 16:33 出处:网络
How do I make redirects in htaccess for traffic comming from \"new\" google images (google.com/images), instead of the old one (images.google.开发者_StackOverflow社区com) ?Try this in your .htaccess:

How do I make redirects in htaccess for traffic comming from "new" google images (google.com/images), instead of the old one (images.google.开发者_StackOverflow社区com) ?


Try this in your .htaccess:

RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://google.com/images [NC]
RewriteRule .* new-redirect-url [NC,L] 

Optionally, you can append R=301 to RewriteRule flags if you wish to do 301 redirect, like: NC,L,R=301.

Also, adjust referer URL if needed, this is sort of generic solution.

0

精彩评论

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

关注公众号