Welcome to WebmasterWorld Guest from 54.159.179.132

Forum Moderators: open

Message Too Old, No Replies

302 Redirect (only for google) using .htaccess

   
4:12 am on Nov 29, 2007 (gmt 0)

5+ Year Member



302 Redirect (only for google) using .htaccess
Lets say all google Ip ranges are included and that Pagerak spoofing works as of now.
Will the cloaking method below work?

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REMOTE_HOST} ^216\.239\.(3[2-9]¦[4-5][0-9]¦6[0-3])\.([0-9]¦[1-9][0-9]¦1([0-9][0-9])¦2([0-4][0-9]¦5[0-5]))$¦^64\.233\.(1([6-8][0-9]¦9[0-1]))\.([0-9]¦[1-9][0-9]¦1([0-9][0-9])¦2([0-4][0-9]¦5[0-5]))$
RewriteRule \.php$ http://www.example.com/ [R=302,L]

Thanks.
3:40 am on Dec 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi askvisa, and welcome to WebmasterWorld :)

You need to change REMOTE_HOST to REMOTE_ADDR.

Other than that, assuming the regex is OK, it looks like it will work. I hate trying to find mistakes in complex regexes :P

11:16 am on Dec 3, 2007 (gmt 0)

5+ Year Member



lol.hey! thanks it works all rite!

[edited by: encyclo at 11:23 am (utc) on Dec. 3, 2007]
[edit reason] moved from another location [/edit]

 

Featured Threads

Hot Threads This Week

Hot Threads This Month