Continued From Page 4

"Some handy variations of ReWritecond..."

RewriteCond %{HTTP_USER_AGENT} ^WebReaper.*$ [OR] RewriteCond %{HTTP_USER_AGENT} ^JOC Web Spider.*$ RewriteRule /* - [F]

If you notice strange browsers(HTTP_USER_AGENT) in your server logs, they could be site grabbers, or offline-browsers. The two ReWriteCond's above would check if the browser is looks like "WebReaper", OR "Joc Web Spider" and send back a 403 [Forbidden] response. When testing Webreaper and JOC, this code causes the applications to stop before they download any html, or images. The applications preserves the original url they requested and they would have to click it visit your site. You could redirect these applications to another url; however, when testing JOC it wouldn't allow itself to be redirected. It appeared to try re-requesting the origianl url, perhaps it uses an internal failure count. It did obey the 403 response! There are many of these offline-browsers available, check your logs occasionally for them. As an alternative to expliciting coding each one, and using the fact that they shouldn't pass anything in the HTTP_REFERER variable, the following should protect your images from them:
note: this could have an effect on friendly search engine spiders!

RewriteCond %{HTTP_REFERER} ^$ ReWriteRule .*\.(jpg|gif)$ - [F]

"Some other handy things...."

RewriteCond %{HTTP_REFERER} ^http://www.nastydomains.com/.*$ [NC] ReWriteRule .* http://www.nasty-domain-hell.com/ [R,L]

The above rule could be used to send anyone coming from a particularily nasty domain, with a request for anything(.* = a string(eg. url) of any length) to your special place.

RewriteCond %{HTTP_REFERER} !^http://www.newbie.com/.*$ [NC] RewriteRule .*page1\.html$ http://www.newbie.com/index.html [R,L]

If someone was deep-linking into your a specific page on your domain "page1.html" the above rule could be used to redirect them to your index page.

You can create ReWriteCond statements that use almost any of your server's environmental variables including: cookies, DNS, IP's. Check the Apache document links included in the article, if you need something special. :)

"I want them to hotlink me...."

If a search engine caches your page, the surfer clicking on your link won't see any of your images, or banners. This is a scenario where you might want the the search engine to be able to hotlink at least your banners so the surfer would only see it.

Funny Symbols
! - negation
^ - start of string
$ - end of string
. - any character
? - repetition [0,1]
* - repetition [0,..,n]
+ - repetition [1,..,n]
\ - escape character
[NC] - ignore case
[R,L] - redirect, last

Regular Expressions
simple examples...

Advanced Students
URL Rewriting Guide
URL Rewriting Engine
Apache HTTP Server

.htaccess testing!
www.hotlinking.com

It doesn't work?
Common problems...

Things that crawl
Friendly Spiders

billy

 
"It is a man's own mind, not his enemy or foe, that lures him to evil ways."
Buddha
 

Continued from Page 1

So with my ego deflated, and my wallet empty, I went back to the newbie board and started doing what I was told. I built and submitted a site everyday, I did the newbie projects of the week, I studied and learned how to write text that gets clicks instead of relying on flashy banners. It took me a lot longer than it should have, but I was finally on my way. Pretty soon I was making more money off of my websites than I was making at my day job, so it was sayonara day job. ;)

Then this thing that everybody had been talking about for months happened, THE SUMMER SLOWDOWN. Almost overnight, my sales dropped by half. I had no traffic base because the spiders were just now finding my pages that should have been submitted waaaaaaay back when. I had no recurring membership base, the one that Voltar told me all winter to build up, because I wanted the big per sign up bucks today.

I was a month behind on my bills and had no choice but to go back to the day job. I worked so many hours at the day job that I didn't even have time to think about a web site for 2 months.

I finally got caught up and in September I started building again. Only this time I'm doing it right. It's now October and I'm doing more than double the sales I was doing back when I thought things were good. The difference is that the majority of these sales are going to a recurring program, and all of these pages are SE friendly and being submitted. Next summer I'm going to say "what slowdown?" and webmastering will be the "day job"!

If I could get one point across to newbies it would be this; The people at VNWR and the DFN want you to succeed, they have no other purpose for being here than that. I owe a lot to the people of VNWR, they've received nothing in return for all of the help they've given me other than the satisfaction of knowing that they have. I also know that as long as I am a webmaster I'll be here to help as well. So come out of the closet, say hello, and lets all make $$.

If you want to learn how to make money in this business, and believe me there is A LOT of money to be made, this is where you need to be. Follow the examples and advice given you to the "T", even when they don't make sense to you, even when you "think" you know a better way, and you and your bank account will be much better off in the long run.

Don’t mistake being lucky for being good. Before you venture off into the unknown you need to have been making the $$ you need to make consistently, month in and month out. You need savings, and you need a good balance of recurring income and per sign up income. Zig Ziglar says that its very important for ANY salesperson to have a solid savings account. Why? Because when you’re low on funds and desperate to make a sale, it shows in your sales pitch and you make a bad situation worse.

And where a brick and mortar salesman would inevitably keep cutting the price (and hence their commission) when they’re desperate for a sale, someone in this business is likely to fall into the trap of giving away more free content than they should in an effort to boost their traffic and sales. That’s bad for your business, and its bad for our industry.

If there’s any way I can help ANY newbie, you know where to find me - Lenny

"I have not failed. I've just found 10,000 ways that won't work."
Thomas Alva Edison (1847-1931)
Have you checked out
the sponsors of the DFN Weekly yet?
Well what are you waiting for?
Check them out NOW!

©2001 VNWR. All rights reserved.