Helpful Information
 
 
Category: Apache configuration
htaccess help

I know I will come off sounding like a newbie, but I'm at about my wits end here so I'm willing to take that chance. :)

I've always used shared hosting but recently I got my own (remotely hosted) dedicated server. (It's a Cobalt RAQ4) Everything was going fine until I tried to use a .htaccess file to prevent hotlinking of my files. Here's the code in the file:

---
IndexIgnore *
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?dosgames.com/.*$ [NC]
RewriteRule \.(zip|exe)$ http://www.dosgames.com/unauth.php [R,L]
---

I'm pretty sure it's fine since I used it on my old host and it worked perfectly. When I try it on my new host however I get an "Internal Server Error":

http://www.dosgames.com/files/

So, I tried a more simple test:

---
ErrorDocument 404 /index.php
---

Same error. (Yes, I am uploading in ASCII.) So after some reading I searched out my access.conf file:

---
# First, we configure the "default" to be a very restrictive set of
# permissions.

<Directory />
Options None
AllowOverride AuthConfig Indexes Limit
AuthFailDelay 2000000
</Directory>
---

From what I've read that should be okay, but is something in there the problem?! It seems like I've tried everything but it won't work, my host says they'll charge me $50/hour (!!!) to fix this problem! :( Any suggestions?! Thanks in advance ...

Are you getting anything in your error logs?
Have you tried adding Options Indexes FollowSymLinks Includes as the first line in your ht? (some configurations need this to properly perform directives, others do not).

If you are getting errors in your logs, let me know what they are (it could be you need to edit the ht options through your conf files, or another directive which is blocking your use).










privacy (GDPR)