homepage Welcome to WebmasterWorld Guest from
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

practical .htaccess cloaking
...or, a way to cloak without a secondary interpreter

 9:27 am on Jul 4, 2002 (gmt 0)

Some time ago I played around with .htaccess cloaking, there are probably lots of ways to do this but I think it could actually be a simple process where you create parallel architecture in sub-folders and point the bots to them. Here is an example"

You need need to give a custom 404 so that apache doesn't give away your modified request_uri if the file could not be found.

You could do either IP or UA or cloaking or both via .htaccess. You could do full IP matches, or partial, and you could match case insensitive UA strings.

ErrorDocument 404 notfound.htm
RewriteEngine on
RewriteBase /
##Stinky PFI Bot
RewriteCond %{REMOTE_ADDR} ^111.222.331回111.222.332回111.222.333回111.222.334 [OR]
RewriteCond %{HTTP_USER_AGENT} ^Stinkybot回Slurpy_PFI [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "Mozilla/5.0 Stinky/1.2.5 (X11; Linux i686; U;) PFI/CAT"
RewriteCond %{REQUEST_URI} !stinky/
RewriteCond %{REQUEST_URI} \.html$
RewriteRule ^(.*)$ /stinky/$1 [L]
##Goggly Bot
RewriteCond %{REMOTE_ADDR} ^112.222.341回112.222.342回112.222.343回112.222.344 [OR]
RewriteCond %{HTTP_USER_AGENT} ^Gogglybot回Pinky_and_the_BRAIN [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "Mozilla/5.0 Gogglybot/CIA EAT YOU HART OUT"
RewriteCond %{REQUEST_URI} !goggly/
RewriteCond %{REQUEST_URI} \.html$
RewriteRule ^(.*)$ /goggly/$1 [L]

In this example all requests from Stinkybot will be internally routed to the subfolder stinky/.
So if Stinkybot asks for www.domain.com it will serve up www.domain.com/stinky/index.html.
And Gogglybot will get www.domain.com/goggly/index.html for the same request.

While it isn't as robust as a cloaking method that takes advantage of secondary scripting it could be practical for mom and pop cloaking.



 3:44 pm on Jul 4, 2002 (gmt 0)

I've played around with that set up too little, it's good but the problem is that it requires you to know what you're doing, and as you said it can be somewhat limiting compared to scripting/programming. It creates an interesting paradox, if you know what you are doing you're likely to script something, if you don't know or feel un-comfortable working with .htaccess then you're likely a good candidate to be satisfied with the limited "features" that method provides.


 3:52 pm on Jul 4, 2002 (gmt 0)

RewriteCond %{REMOTE_ADDR} ^111.222.331?^111.222.332?^111.222.333?^111.222.334 [OR]

You might want to consider this simpler phrasing:

RewriteCond %{REMOTE_ADDR} ^111.222.33[1-4] [OR]

The only "issue" with your approach is that any SSI virtual directives in your HTML will still reference the original document root. That may or may not be a problem, given your specific setup.


 5:55 pm on Jul 4, 2002 (gmt 0)

Bird -
You might want to consider this simpler phrasing:

RewriteCond %{REMOTE_ADDR} ^111.222.33[1-4] [OR]

Hehe, I was bing lazy about modifying a working model. That was a cut and paste job from a real example, but I had to take out the real IPs and put in the filler. RewriteCond %{REMOTE_ADDR} ^111.222.33[1-4] [OR] is a lot cleaner.

Well I guess it works for old spammers like me. I've found it practical for sites when I just want to pump up the KW% and link architecture slightly on smaller Ecommerce sites. When $pop =~ m/old spammer/i; it works. ;)


 2:19 am on Jul 5, 2002 (gmt 0)

>Well I guess it works for old spammers like me.

Little, I hate to admit it, but it even works for spammers older than you ;)

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