• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Restricting access to subfolder with .htaccess

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Restricting access to subfolder with .htaccess

    My .htaccess is as follows:

    Code:
    AuthType Basic
    order deny,allow
    deny from all
    
    AuthName "Password Protected Area"
    AuthUserFile /var/sites/d/example/public_html/.htpasswd
    Require valid-user
    
    # Allow from EXAMPLE
    Allow from xxx.xxx.xxx.xxx
    Satisfy Any
    If I stick this in the public_html folder anyone from the IP address is allowed access, other people have to enter the password defined in the .htpasswd

    This works perfectly if I want to restrict access to the whole site, how would I change this so that access to just a specific subfolder, but the rest is open to all? Can I just put the .htaccess and .htpasswd in the subfolder or is it not that simple (obviously changing the path to the AuthUserFile)
    Originally posted by Stevie Wonder Boy
    I can't see any way to do it can you please advise?

    I want my account deleted and all of my information removed, I want to invoke my right to be forgotten.

Working...
X