fsap/matsu-web/master/.htaccess - Htaccess File

fsap/matsu-web/master/.htaccess

# Basic
AuthUserFile /home/fujiwara/matsu-web/.htpasswd
AuthGroupFile /dev/null
AuthName "Secret Area"
AuthType Basic

require valid-user

<Files ~ "^.(htpasswd|htaccess)$">
    deny from all
</Files>

# SP redirect
RewriteEngine on

RewriteCond %{REQUEST_URI} !/sp/
RewriteCond %{HTTP_USER_AGENT} (iPod|iPhone|Android|Windows Phone)
RewriteRule ^(.*)$ sp/$1 [R]
RewriteBase /

RewriteCond %{REQUEST_URI} /sp/
RewriteCond %{HTTP_USER_AGENT} !(iPod|iPhone|Android|Windows Phone)
RewriteRule ^sp/(.*)$ $1 [R]
RewriteBase /

On Github License

Files

Download PDF of Htaccess file
HTTP_USER_AGENT, REQUEST_URI

Comments

Apache