Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
February 09, 2012, 06:38:10 PM

Pages: [1]   Go Down
  Print  
Author Topic: Testing for an htaccess error on my site  (Read 916 times)
Friptzap
Newbie
*
Offline Offline

Posts: 2


« on: July 23, 2010, 09:59:29 AM »

I am trying to figure out why I am getting an error on my site. I have the following code which is to prevent outside refers to files in specific directories but I am getting errors logged when the pages are accessed and an attempted call to a 403.shtml file.

I use the following .htaccess code:
## Don't allow directory listing in a web browser
Options -Indexes
IndexIgnore *


## all works! as long as refer page does not start from home page
## no hot-linking
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
## RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?clarencezimmerman.com [NC]
## this rewrite works:
RewriteRule ^.*\.(ico|pdf|flv|jpg|jpeg|mp3|mpg|mp4|mov|wav|wmv|png|gif|swf|css|js)$ http://www.clarencezimmerman.com/moon.jpg [NC,R,L]


As well as the following robot.txt code:
User-Agent:*
Disallow:/images/
Disallow:/image.jpg

If anyone attempts to link an immage on an outside page like this:


it should match this image:


Any suggestions?








Logged
Friptzap
Newbie
*
Offline Offline

Posts: 2


« Reply #1 on: July 23, 2010, 10:06:17 AM »

OK. Apparently the hot linking part IS working but I am still getting errors loged and I can't figure out how to fix that.

When the pages are accessed directly I get errors.
http://clarencezimmerman.com/MyHawaii/My%20Hawaii_files/
Will now show the 403.shtml results however I don;t see where I am calling up this file directly.

Even pages with an index file that loads such as :
http://clarencezimmerman.com/MyHawaii
I still get errors logged.

The errors look like this:
Fri Jul 23 09:43:36 2010] [error] [client 97.102.232.194] File does not exist: /home/clare5/public_html/404.shtml
[Fri Jul 23 09:43:36 2010] [error] [client 97.102.232.194] File does not exist: /home/clare5/public_html/favicon.ico
[Fri Jul 23 09:37:37 2010] [error] [client 97.102.232.194] Directory index forbidden by rule: /home/clare5/public_html/MyHawaii/My Hawaii_files/
[Fri Jul 23 09:37:10 2010] [error] [client 97.102.232.194] Directory index forbidden by rule: /home/clare5/public_html/MyHawaii/My Hawaii_files/
[Fri Jul 23 09:36:09 2010] [error] [client 97.102.232.194] Directory index forbidden by rule: /home/clare5/public_html/juke/
[Fri Jul 23 09:23:41 2010] [error] [client 97.102.232.194] Directory index forbidden by rule: /home/clare5/public_html/MyHawaii/My Hawaii_files/
[Fri Jul 23 09:12:31 2010] [error] [client 97.102.232.194] File does not exist: /home/clare5/public_html/403.shtml
[Fri Jul 23 09:12:31 2010] [error] [client 97.102.232.194] Directory index forbidden by rule: /home/clare5/public_html/MyHawaii/My Hawaii_files/
[Fri Jul 23 09:02:52 2010] [error] [client 97.102.232.194] File does not exist: /home/clare5/public_html/403.shtml
[Fri Jul 23 09:02:52 2010] [error] [client 97.102.232.194] Directory index forbidden by rule: /home/clare5/public_html/MyHawaii/My Hawaii_files/
[Fri Jul 23 08:59:29 2010] [error] [client 97.102.232.194] File does not exist: /home/clare5/public_html/403.shtml
[Fri Jul 23 08:59:29 2010] [error] [client 97.102.232.194] Directory index forbidden by rule: /home/clare5/public_html/MyHawaii/My Hawaii_files/
[Fri Jul 23 08:59:13 2010] [error] [client 97.102.232.194] File does not exist: /home/clare5/public_html/403.shtml
[Fri Jul 23 08:59:13 2010] [error] [client 97.102.232.194] Directory index forbidden by rule: /home/clare5/public_html/MyHawaii/My Hawaii_files/
[Fri Jul 23 08:16:57 2010] [error] [client 79.112.54.18] File does not exist: /home/clare5/public_html/403.shtml
[Fri Jul 23 08:16:57 2010] [error] [client 79.112.54.18] Directory index forbidden by rule: /home/clare5/public_html/MyHawaii/My Hawaii_files/

The 404 file is being called and the icon file they obviously don;t exist but again I am not calling for them directly either...

Any help appreciated.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: