- 2008-11-05 (Wed) 10:57
- 開発ツール・技術
すぐ忘れてしまうのでメモ程度にエントリー。
- ディレクトリー内をブラウズ可能に
Options +Indexes ## block a few types of files from showing IndexIgnore *.wmv *.mp4 *.avi
Options All -Indexes
ErrorDocument 403 /somePage1.html ErrorDocument 404 /somePage2.html ErrorDocument 500 /somePage3.html
DirectoryIndex myhome.htm index.htm index.php
order deny,allow deny from 123.456.789.00 deny from 123.456.789.00 deny from .someDomain.com allow from all
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^searchbot1 [OR]
RewriteCond %{HTTP_USER_AGENT} ^searchbot2 [OR]
RewriteCond %{HTTP_USER_AGENT} ^searchbot3
RewriteRule ^(.*)$ http://www.yourSite.com/goAway.html
もしくは次。
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^searchbot1 [OR]
RewriteCond %{HTTP_USER_AGENT} ^searchbot2 [OR]
RewriteCond %{HTTP_USER_AGENT} ^searchbot3
RewriteRule ^(.*)$ http://www.someOtherWebsite.com/ [R, L]
元記事は以下からどうぞ。
» htaccess Cheatsheet | marketing . web . design
■ 関連記事
Comments:0
Trackbacks:0
- Trackback URL for this entry
- http://www.ideaxidea.com/archives/2008/11/htaccess.html/trackback
- Listed below are links to weblogs that reference
- .htaccessに関する覚え書き from IDEA*IDEA ~ 百式管理人のライフハックブログ ~
