LXY3800 发表于 2018-11-20 11:14:30

apache中301和403优先级

  配置如下
  
  Order allow,deny
  Allow from all
  Deny from 172.168.1.160
  
  
  RewriteEngine on
  RewriteCond %{HTTP_HOST} ^www.456.com$
  RewriteRule ^/(.*)$ http://www.123.com/$1
  
  当禁止本地访问/data/www时,
  #curl -x127.0.0.1:80 'http://www.456.com/1.txt'
  
  
  301 Moved Permanently
  
  Moved Permanently
  The document has moved here.
  
  #
  因此,301跳转的优先级较高于403禁止



页: [1]
查看完整版本: apache中301和403优先级