Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Security Updates - .htaccess file and robots.txt


Guest

Recommended Posts

Posted

I'm putting in the security updates that spooks listed in his post. Some are supplying scripts for the .htaccess a robots files, but I don't have them in the root or includes directory (I don't use catalog, store is in root).

 

Can I just create them ASCII .txt and put the information in there?

 

Sorry for being a dumba@@.

 

Thanks to spooks and the others that did the security updates.

Posted
I'm putting in the security updates that spooks listed in his post. Some are supplying scripts for the .htaccess a robots files, but I don't have them in the root or includes directory (I don't use catalog, store is in root).

 

Can I just create them ASCII .txt and put the information in there?

 

Sorry for being a dumba@@.

 

Thanks to spooks and the others that did the security updates.

It is a hidden file, so you may not see it unless you are using the webhosts control panel filemanager, or filezilla set to show hidden files.

 

If it is not there, create it in an pure text editor and call it .htaccess and put it in your store root.

Posted
It is a hidden file

 

That was the problem, thank you. I couldn't see it with the host file editor but could with Core FTP. I got all of the scripts in, but two are blowing up.

 

The one I care about is this:

 

# Deny domain access to spammers and other scumbags

RewriteEngine on

php_flag register_globals off

SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots

Deny from env=block_bad_bots

 

SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots

Deny from env=block_bad_bots

 

by itself works.

 

Do I need the RewriteEngine on and php_flag register_globals off need to be there?

 

Thanks in advance.

Posted
That was the problem, thank you. I couldn't see it with the host file editor but could with Core FTP. I got all of the scripts in, but two are blowing up.

 

The one I care about is this:

 

# Deny domain access to spammers and other scumbags

RewriteEngine on

php_flag register_globals off

SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots

Deny from env=block_bad_bots

 

SetEnvIfNoCase User-Agent "^libwww-perl*" block_bad_bots

Deny from env=block_bad_bots

 

by itself works.

 

Do I need the RewriteEngine on and php_flag register_globals off need to be there?

 

Thanks in advance.

It did not work for me the way it was written, so I took globals line out and used

 

# ban spam bots

RewriteEngine on

RewriteCond %{HTTP_USER_AGENT} ^Indy*Library [OR]

RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]

RewriteCond %{HTTP_USER_AGENT} ^Java/1.6.0_11 [OR]

RewriteCond %{HTTP_USER_AGENT} ^libwww-perl [OR]

RewriteCond %{HTTP_USER_AGENT} ^Morfeus [OR]

RewriteCond %{HTTP_USER_AGENT} ^robotgenius [OR]

RewriteCond %{HTTP_USER_AGENT} ^Toata

RewriteRule ^.* - [F,L]

RewriteCond %{HTTP_REFERER} ^http://your domain$

RewriteRule !^http://[^/.]\.your domain.* - [F,L]

 

 

If you use it, change the domain in the last two lines.

 

The [OR] is on all but the last.

Posted
It did not work for me the way it was written, so I took globals line out and used

 

# ban spam bots

RewriteEngine on

RewriteCond %{HTTP_USER_AGENT} ^Indy*Library [OR]

RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]

RewriteCond %{HTTP_USER_AGENT} ^Java/1.6.0_11 [OR]

RewriteCond %{HTTP_USER_AGENT} ^libwww-perl [OR]

RewriteCond %{HTTP_USER_AGENT} ^Morfeus [OR]

RewriteCond %{HTTP_USER_AGENT} ^robotgenius [OR]

RewriteCond %{HTTP_USER_AGENT} ^Toata

RewriteRule ^.* - [F,L]

RewriteCond %{HTTP_REFERER} ^http://your domain$

RewriteRule !^http://[^/.]\.your domain.* - [F,L]

 

 

If you use it, change the domain in the last two lines.

 

The [OR] is on all but the last.

 

 

Got it! Thank you very much!

  • 8 months later...
Posted

It did not work for me the way it was written, so I took globals line out and used

 

# ban spam bots

RewriteEngine on

RewriteCond %{HTTP_USER_AGENT} ^Indy*Library [OR]

RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]

RewriteCond %{HTTP_USER_AGENT} ^Java/1.6.0_11 [OR]

RewriteCond %{HTTP_USER_AGENT} ^libwww-perl [OR]

RewriteCond %{HTTP_USER_AGENT} ^Morfeus [OR]

RewriteCond %{HTTP_USER_AGENT} ^robotgenius [OR]

RewriteCond %{HTTP_USER_AGENT} ^Toata

RewriteRule ^.* - [F,L]

RewriteCond %{HTTP_REFERER} ^http://your domain$

RewriteRule !^http://[^/.]\.your domain.* - [F,L]

 

 

If you use it, change the domain in the last two lines.

 

The [OR] is on all but the last.

 

I thank you as well, the original did not work for me either.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...