Results 1 to 6 of 6

Thread: htaccess problem

  1. #1
    Dzinerbear
    Guest

    htaccess problem

    Hi all,

    I'm having a little access problem.

    My site is set up as follows:

    gallery folder
    ...index.html
    ...entry.htm
    ...hidden folder
    ......thumbs.htm

    Each gallery on my site is contained within it's own folder. I've placed the following htaccess file in each hidden folder to prevent bookmarking etc.

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http(s)?://([a-z0-9-]+\.)*mydomain.com/ [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://([a-z0-9-]+\.)*mancheck\.com/ [NC]
    RewriteRule /* http://%{HTTP_HOST}/ [R,L]

    I've had some people contribute some stuff to the stuff and as thanks, I gave them back door access through a folder that contained no htaccess file, but provided them with a list of all of the hidden thumbs.htm URLs. It worked for a while, now it's suddenly stopped working.

    Does anyone know how I can prevent people from bookmarking the hidden pages (or cutting and pasting them) but how I can still give someone backdoor access to my site.

    Thanks
    Dzinerbear


  2. #2
    virgin by request ;) Chilihost's Avatar
    Join Date
    Oct 2003
    Posts
    4,496
    are you using .htpasswd access for your site as well? if yes, then why not just add these special users in with their own userid/password?


    cheers,

    Luke


  3. #3
    Dzinerbear
    Guest
    Sorry, I should have clarified this: No, access through my site is through MANcheck ID and password.

    Thanks
    Dzinerbear


  4. #4
    virgin by request ;) Chilihost's Avatar
    Join Date
    Oct 2003
    Posts
    4,496
    In that case you may want to set up a specific backdoor page with links into your members area and give out that url. That way if you find people are getting greedy and using it too much you just have to yank that page.

    cheers,

    Luke


  5. #5
    Dzinerbear
    Guest
    This is exactly what I'm trying to do, but when you click on the URLs into the member's area, the htaccess file in those folders kicks in and sends you back to my main page.

    Thanks
    Dzinerbear


  6. #6
    Dzinerbear
    Guest

    Solution

    HI all,

    I went digging in Google and found another AVS bulletin board and found the solution, here's the code that worked if anyone's interested.

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} !^http://.+.yourdomain.com/* [NC]
    RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/* [NC]
    RewriteCond %{HTTP_REFERER} !^http://.+.avsofchoice.com/* [NC]
    RewriteCond %{HTTP_REFERER} !^http://.+.cyberage.com/* [NC]
    RewriteCond %{HTTP_REFERER} !^http://.+.unitedgaysites.com/* [NC]
    RewriteCond %{HTTP_REFERER} !^http://.+.cybersexnetwork.com/* [NC]
    RewriteCond %{HTTP_REFERER} !^http://.+.ugas.com/* [NC]
    RewriteRule /* http://www.yourdomain.com/whatever.html [R,L]

    For my purposes I just removed all of the lines relating to UGAS and their brands, and it worked fine.

    Thanks
    Dzinerbear


Posting Permissions

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