homepage Welcome to WebmasterWorld Guest from 54.161.175.231
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Marketing and Biz Dev / Cloaking
Forum Library, Charter, Moderator: open

Cloaking Forum

    
302 Redirect (only for google) using .htaccess
asksiva




msg:3515861
 4:12 am on Nov 29, 2007 (gmt 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.

 

volatilegx




msg:3517752
 3:40 am on Dec 1, 2007 (gmt 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

asksiva




msg:3519192
 11:16 am on Dec 3, 2007 (gmt 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]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Marketing and Biz Dev / Cloaking
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved