.htaccessメモ
該当ファイルへのアクセスをリダイレクト
RedirectMatch 301 /test http://yahoo.co.jp
UAに応じてリダイレクト
RewriteCond %{HTTP_USER_AGENT} !(iPod|iPhone|iPad|Android)
RewriteRule ^sp/(.*)$ / [R=301,L]
RewriteCond %{HTTP_USER_AGENT} (iPhone|iPod|iPad|Android) [NC]
RewriteRule ^$ /sp/ [R=301,L]
RewriteCond %{HTTP_USER_AGENT} !Twitterbot [NC]
RewriteRule ^$ /pc/ [R=301,L]
FBやmixiのクローラを許可
order deny,allow
deny from all
Allow from env=fb_crawler
Allow from env=fb_crawler2
Allow from env=mixi_crawler
basic認証
AuthUserFile /home/hogehoge/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter your ID and password”
AuthType Basic
require valid-user
Author And Source
この問題について(.htaccessメモ), 我々は、より多くの情報をここで見つけました https://qiita.com/terumichi1209/items/29dad889df4faf0abdc0著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .