Answers.Body: <p>Using htaccess/htpasswd in each folder does work, but I don't find it really elegant.  Would there be a better way of doing this without Craft's users?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-23T21:07:39.570Z
Answers.Text: Either `htpasswd` or enforcing it at the Craft template level seem pretty straight forward to me.
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-23T20:53:46.327Z
Answers.LastActivityDate: 2017-01-23T20:53:46.327Z
Answers.UserDisplayName: Eric Chantigny
Body: <p>I would like to know if it is possible to protect some sections of the site with an htpasswd or not?  I know that I could protect it by using user groups in my template, but I'm looking at avoiding the cost simply because the site is very temporary (1 week) and not for external purposes.</p>
  
  <p>So basically,</p>
  
  <p><a href="http://mysite.com/mysection1" rel="nofollow noreferrer">http://mysite.com/mysection1</a></p>
  
  <p><a href="http://mysite.com/mysection2" rel="nofollow noreferrer">http://mysite.com/mysection2</a></p>
  
  <p><a href="http://mysite.com/mysection3" rel="nofollow noreferrer">http://mysite.com/mysection3</a></p>
  
  <p>Those 3 sections would be protected by a different password, but they would also be pages in my site.  Can I just create the real physical folder and create the same page with same url in Craft?  Is there a way to achieve this?</p>
  
  <p>Thanks!</p>
  
Tags: <users><password>
Title: Protecting paths with htpasswd
ThreadText: # Protecting paths with htpasswd
  
  (Asked by: username_0 on 2017-01-23)
  
  I would like to know if it is possible to protect some sections of the site with an htpasswd or not? I know that I could protect it by using user groups in my template, but I'm looking at avoiding the cost simply because the site is very temporary (1 week) and not for external purposes.
  
  So basically,
  
  <http://mysite.com/mysection1>
  
  <http://mysite.com/mysection2>
  
  <http://mysite.com/mysection3>
  
  Those 3 sections would be protected by a different password, but they would also be pages in my site. Can I just create the real physical folder and create the same page with same url in Craft? Is there a way to achieve this?
  
  Thanks!
  
  **Tags:** users, password
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-01-23. Score: 1
  
  Using htaccess/htpasswd in each folder does work, but I don't find it really elegant. Would there be a better way of doing this without Craft's users?
  
  > **Comments:**
  > **username_1**: Either `htpasswd` or enforcing it at the Craft template level seem pretty straight forward to me.  
  
  ---
  
  