Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

htaccess in windows problem

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
pls help, im having a problem using the htaccess file, i dont think its reading it???

in windows i cant have a file called ".htaccess" because of the leading "." so i have renamed it to "htaccess"

i have changed this in apache config file like this:
________________________________________________________
# AccessFileName: The name of the file to look for in each directory
# for access control information. See also the AllowOverride directive.
#
AccessFileName htaccess

#
# The following lines prevent htaccess and htpasswd files from being
# viewed by Web clients.
#
<Files ~ &quot;^\htaccess&quot;>
Order allow,deny
Deny from all
</Files>
________________________________________________________

and i have put the following htaccess file in a webdirectory on my server:
________________________________________________________
<Limit>
order deny,allow
deny from all
</Limit>
________________________________________________________

this should stop me from seeing anything in this folder right?
the folder it is in:
any help would be appreciated,
thanks,
Thomas Smart
 
Try adding this to the end of your httpd.conf:
<Directory &quot;/path/to/web/dir&quot;>
AllowOverride all
</Directory>
If your aren't allowed to use htaccess (AllowOverride none, the default), it wouldn't work. //Daniel
 
no i can still access the folder?
this is realy wyrd isnt it?

im using apache 2 if that helps?

thanks,
 
YES! thank you :D:D:D it works! hahaha :D now i gotta try if this anti-bandwidth theft script works, which is the reason i got into htaccess in the first place...
 
ok cool iv installed the antibandwidttheft script and it seems to be working, but ther is sumthin wyrd: i have put this script in my image folder on ___________________________________
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^ [NC]
RewriteRule ^.*\.jpg$ - [F]
___________________________________
if i go streight to the address i get to c the picture which is good.

if i go to i get to see the picture, (which i shouldnt), but it turns into a red cross after i refresh, it should be a red cross the moment i go there? i though this might be a refresh problem?

thanks,
 
yes i think it was a refresh, works fine if i go ther without checking the first site first :)
cool
thnks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top