Forum Moderators: open

Message Too Old, No Replies

As simple as cloaking could get?

         

littleman

11:35 pm on Feb 15, 2001 (gmt 0)



I was trying to come up with the simplest method of cloaking possible. I came up with this using .htaccess with mod_rewrite. It is limited but could be useful.

#You need something like this so your cloak path isn't given away.
ErrorDocument 404 "<h1> 404 Page Missing <h1>

RewriteEngine on
RewriteBase /
#sebots example
RewriteCond %{REMOTE_ADDR} ^111.111.111.19$ [OR]
RewriteCond %{REMOTE_ADDR} ^111.111.111.29$ [OR]
#More compact style
RewriteCond %{REMOTE_ADDR} ^111.111.111.13$¦^111.111.111.115$ [OR]
#Include ranges, this example lets in a class C
RewriteCond %{REMOTE_ADDR} ^111.111.112.
RewriteRule ^(.*).html /sebots/$1.html [P]

Air

4:20 am on Feb 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's pretty cool littleman. Simple from the point of view that you get lot's of power with few statements, but I'll bet not many will see the use of mod rewrite as "simple" cloaking:)

It would work well though for those that want to deliver different pages to a smaller subset of visitors by IP Address. Were you thinking along these lines, or were you thinking for full fledged cloaking?

littleman

6:29 am on Feb 16, 2001 (gmt 0)



Actually I was thinking about a one size fits all, on or off type of set up. It isn't the most practical approach. Really I was just playing around with code to see what could be done. If anyone wants to add any improvements, please post away.