Apache拒绝开发网站,但一个网址

时间:2013-08-02 01:04:23

标签: apache

我的devsite正在与其他生产网站一起运行。我需要拒绝开发站点,但允许访问一个开发站点的URL。


  AuthType Basic
  AuthName "My Development Site"
  AuthUserFile /path_to/.htpasswd
  Require valid-user

  # Need to deny devsite, and working!
  SetEnvIf Host .*\.dev\.site\.com$ DEV_SITE

  # But allow x.dev.site.com/xml/, I think the idea is to unset DEV_SITE, 
  # but not working!
  SetEnvIf Request_URI ^/xml/ !DEV_SITE 

  Order Allow,Deny
  Allow from all
  Deny from env=DEV_SITE

  Satisfy any

0 个答案:

没有答案