Welcome to WebmasterWorld Guest from 54.147.134.218

Forum Moderators: open

Message Too Old, No Replies

302 Redirect (only for google) using .htaccess

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

New User

5+ Year Member

joined:Nov 29, 2007
posts:5
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 22, 2001
posts:2450
votes: 0


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)

New User

5+ Year Member

joined:Nov 29, 2007
posts: 5
votes: 0


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]

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members