Tag: Apache/アクセス制限
SetEnvIF Request_URI "^/test.html" ok_path SetEnvIF Accept "text/html" ok SetEnvIF ok_path "^$" !ok <VirtualHost *:80> DocumentRoot /var/www/html <Directory /var/www/html> Options FollowSymLinks AllowOverride None Order allow,deny Allow from env=ok </Directory> </VirtualHost>
解説
SetEnvIf User-Agent "Android" dame1 SetEnvIf User-Agent "iPhone" dame2 SetEnvIf User-Agent "iPod" dame3 SetEnvIf User-Agent "iPad" dame4 SetEnvIf User-Agent "BlackBerry" dame5 order deny,allow deny from all allow from env=dame1 allow from env=dame2 allow from env=dame3 allow from env=dame4 allow from env=dame5