基本の.htaccess設定

Wordprssの設定であれ、静的ページの設定であれ、まずは設置しておくと便利な「.htaccess」の基本設定。
ファイル名を.htaccessにしてアップロード。できない場合は適当な名前をつけてアップロードしてから名前を変えればおk

ErrorDocument 401 http://for.fool.jp/401.html #各エラーページの飛ばし先
ErrorDocument 403 http://for.fool.jp/403.html
ErrorDocument 404 http://for.fool.jp/404.html
ErrorDocument 500 http://for.fool.jp/500.html
DirectoryIndex index.html index.cgi index.php index.shtml #.phpとか、どんな拡張子でもindexにするよ

Redirect permanent /xxx/index.html http://xxx/xxx/index.php #転送するよ

order allow,deny
allow from all
deny from ★拒否したいIP★    #拒否したいIPがあれば、

関連記事

ページ上部へ戻る