New Zenner
- Join Date:
- Apr 2007
- Posts:
- 40
- Plugin Contributions:
- 0
.htaccess Blocking Images
Some code was added to my .htaccess file under public_html, and I have no clue how it got there. Possibly when I was changing permission numbers for some folders. Just realized there was a problem for others accessing images on my site when I was using practiceboard and all my images had red x's. Everything was fine on my computer, so I didn't realize there was a problem.
My site host had me change the .htaccess folder name because she saw some suspect code. Once I did this, the images were fine. To my knowledge, all I have done intentionally to alter this file, is add some IP address to my deny list in Cpanel.
Here is the code:
# -FrontPage-
IndexIgnore .htaccess /.?? ~ # /HEADER /README /_vti
<Limit GET POST>
#The next line modified by DenyIP
order allow,deny
#The next line modified by DenyIP
#deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName https://www.xxxxxxxxxxx.com
AuthUserFile /xxxxxxxxx
AuthGroupFile /xxxxxxxxxxx
<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from xx.xxx.xxx.xx
deny from xx.xxx.xx.xxx
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://xxxxxxxxxx.com/.$ [NC]
RewriteCond %{HTTP_REFERER} !^http://xxxxxxxxxx.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.xxxxxxxxxx.com/.$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.xxxxxxxxxx.com$ [NC]
RewriteRule .*.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
deny from xxx.xxx.xx.xxx
deny from xxx.xxx.xxx.xx
My question is, how do I change this file so it has the correct code. Right now, renamed, it is inaccessible.
I noticed when I went back into my site files, another .htaccess file had been added, which I thought was empty yesterday.:shocking: but now today has this code:
# $Id: .htaccess 1105 2005-04-04 22:05:35Z birdbrain $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
# AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
<IfModule mod_setenvif.c>
<IfDefine SSL>
SetEnvIf User-Agent ".MSIE."
nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0
</IfDefine>
</IfModule>
# Fix certain PHP values
#<IfModule mod_php4.c>
# php_value session.use_trans_sid 0
# php_value register_globals 1
#</IfModule>
# to turn off register_globals
# php_value register_globals 0
I had looked into the administration/.htaccess file to see the code. Then went to public_html/.htaccess to view it, and was asked if I wanted to overwrite it, I clicked skip, and when I viewed the file, it now has the same code as the admin. file.
My question: what do I do? Is the new .htaccess file code correct, or is the one first above correct, but needs some code changes. Hope this makes sense because it's all very confusing.
Thanks anyone.