Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jul 2004
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts

    How come .htaccess isn't working right?

    Here is all I have tried:

    Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?fszone.org [NC]
    RewriteCond %{REQUEST_URI} !^/hotlinking\.gif$
    RewriteRule \.(gif|jpe?g|bmp|png|wmv)$ http://www.fszone.org/hi.gif [NC,R,L]

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://(.*)?fszone\.org/ [NC]
    RewriteCond %{HTTP_REFERER} !^$
    RewriteRule \.(gif|jpg|jpeg|bmp)$ http://www.fszone.org/maian_uploader/uploads/fszone.png [L]

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?fszone.org(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?fszone.org/forums(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?fszone.org(/)?.*$ [NC]
    RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.fszone.org/maian_uploader/uploads/fszone.png [R,NC]

    Then I've uploaded it to http://www.fszone.org/maian_uploader/uploads/ and renamed it to .htaccess. But for some reason it block ALL hotlinks... when it's set to block them from everywhere BUT my own website.

    I know for a fact the first one works because a webmaster gave it to me and it works on his server!

    Anyone here have any suggestions?

    I'm running windows XP with Apache 2.0.49
    Last edited by fszone; 07-30-2004 at 05:42 AM.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Canada
    Posts
    253
    Thanks
    0
    Thanked 0 Times in 0 Posts
    dunno if this helps, but try this one...

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?fszone.org/.*$ [NC]
    RewriteRule \.(gif|jpg|bmp|png|wmv)$ http://www.fszone.org/maian_uploader/uploads/fszone.png [R,L]


    be sure your file is simply...
    .htaccess
    and not something like...
    .htaccess.txt

  • #3
    New Coder
    Join Date
    Jul 2004
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That didn't do the job either.

    Is there some special server setting or anything I have to allow?

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Canada
    Posts
    253
    Thanks
    0
    Thanked 0 Times in 0 Posts
    have you checked with your host that they allow htaccess and mod_rewrite?

  • #5
    New Coder
    Join Date
    Jul 2004
    Posts
    10
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'm not sure. Unless you have to change a server setting then I'm guessing yes.


    I've also tried the one you gave me on my own server (Easy PHP, Apache 1.3.27) and it didn't work either. Also when I try to access the directory the .htaccess is in I get a 500 Internal Server error


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •