Web Hosting Talk







View Full Version : Hard coding .htaccess


Exbodyguard
04-01-2001, 02:07 PM
Ok, there are scripts out there that grab email address's for spam. There a java scripts that can be used to block these altho they are not entirley reliablve.

Here's the question:

If I place All email address's in a protected folder, then hard code the username and pass into a link from an unprotected area, will the email still be accessable to those scripts??

Ie <a href=http://guest:guest@domainname.com>

sodapopinski
04-01-2001, 02:28 PM
Originally posted by Exbodyguard
Ok, there are scripts out there that grab email address's for spam. There a java scripts that can be used to block these altho they are not entirley reliablve.

Here's the question:

If I place All email address's in a protected folder, then hard code the username and pass into a link from an unprotected area, will the email still be accessable to those scripts??

Ie <a href=http://guest:guest@domainname.com>



If you put that list into a dir a protected folder, I believe that no scripts could access that list.

atiep
04-01-2001, 04:09 PM
don't put email address on your webppage ?
put web formmail instead ....

Exbodyguard
04-01-2001, 04:44 PM
I actually am using forms, however, i am using more than one form and don't want to use more than on e cgi script... so I hard code the email into the form....
I suppose i could use a form to do mailto: but that is unproffessional.

Tim Greer
04-01-2001, 06:02 PM
Originally posted by Exbodyguard
I actually am using forms, however, i am using more than one form and don't want to use more than on e cgi script... so I hard code the email into the form....
I suppose i could use a form to do mailto: but that is unproffessional.



Simply put the email addresses into the script, not into the form's HTML page it posts from. You can also just change a number. I.e., on one page it'll have <</b>input type=hidden name=sendto value=1> will tell the script that 1 = some email address. On another page, you can have <</b>input type=hidden name=sendto value=2> will send to another email address. No email address is shown on the web pages and it is completely dynamic whereas you can have people select a person to email from a drop down list, displayed by name and the hidden values as letters, numbers or whatever that point to a certain email in the script.

JavaScript will NOT stop SPAM bots, they don't use or execute JavaScript, anymore than a search engine spider would. JavaScript is good for one thing, and that's doing things on a client's browser, instead of the server and to add more interaction for them to do pointless, cosmetic type things. JavaScript is worthless, especially for trying to secure any web page, block access or do any sort of checking for anything. Never count on or use JavaScript for any other reason, other than to add some dynamics to the web pages.

[Edited by Tim_Greer on 04-01-2001 at 06:21 PM]

Tim Greer
04-02-2001, 03:13 AM
Wasn't this quetion originally about "hard coding .htaccess"? What do you mean? I don't understand the thread's title? You mean configuring it, putting information and directives into it? Or?

[Edited by Tim_Greer on 04-02-2001 at 03:28 AM]

Website Rob
04-02-2001, 06:13 AM
With regard to protecting Email addresses from Spam Bots, I have found the easiest method is to use the ASCII symbol to replace the @ sign. Most coders of these programs know that speed is of the essence. Since you can code a valid Email address as you&amp;#0000064;yourdomain.com, this is not picked up by the Bots. Slows them down too much having to check something like that.

Proof of the pudding is, I've been coding Email addresses like this (for Web related pages) for 3 years and sites I've used it, on receive very little Spam. Someone once mentioned about Spam Bots working around this, but to-date, I haven't noticed any that have.

Exbodyguard
04-02-2001, 07:08 AM
Tim, website rob

Thanks for the insite, this should help.

In reference to hard coding ... what i meant was
1) create a directory called guest for example..
2) place .htaccess protection on it so you are required to use a user name and password to view it,
3) code the link with the user name and pass ie
a href=username:password@somepage.htm using of course the < >

I guess i'm going to have to dig out my perl cookbook
:)

Tim Greer
04-02-2001, 07:25 AM
Originally posted by Exbodyguard
Tim, website rob

Thanks for the insite, this should help.

In reference to hard coding ... what i meant was
1) create a directory called guest for example..
2) place .htaccess protection on it so you are required to use a user name and password to view it,
3) code the link with the user name and pass ie
a href=username:password@somepage.htm using of course the < >

I guess i'm going to have to dig out my perl cookbook
:)

I see what you mean, but I think if you include the link on a publicly accessible page, that the SPAM bot's will just follow it anyway? Perhaps they can't handle authentication, but that seems like a lot to go through in comparison. You can do a few other things, such as limit access to your web site, based on the person's browser. I.e., if it's not mozilla, IE, netscape, Lynx, Oracle or whatever, then it's a spider or bot. Of course, they can fool the http_agent field, so you can go further and maybe just make them require a cookie to access a certain area, but then you have to deal with people that have browser's that don't support cookies or have them disabled for a stupid, paranoid reason.

I think the best solution, and faster and more versatile solution, would be the suggestion of the email address being mangled via HTML, but still allow people to click on it or access it. But, you said you didn't want to use that way and use form mail anyway, right? If so, I can offer you the solution to get around putting the email in the HTML page and giving yourself complete control over easily altering what emails go where and how they are associated (key words being keys, associative array/hash) for a simple solution that can't really be beat anyway.

PS: Isn't the Perl Cookbook an awesome book? Just looking through it and getting ideas from the recipes that I forgot about long ago or never thought about doing it that way.

Exbodyguard
04-02-2001, 08:26 PM
Thanx Tim

I am so glad i came back here. I have so much to learn...and so little time........ Arrrghh .

Yeah the perl cookbook is great.. Perl in a nutshell is good as well... comprehnsive to point of being overwhelming for a newbie.