このように便利な Rewrite 機能は、個別ディレクトリに設置された .htaccess にも指定することができる。しかし、.htaccess に書けるのは RewriteEngine, RewriteBase, RewriteCond, RewriteRule だけで、ロギングに関する指定子などは書けないし、色々と注意すべきハマリ点がある。ここではそれらを一気に解説しようと思う。これは管理者になれない(=httpd.confを編集できない)一般ユーザにとっては重要な情報になるだろうね。 .htaccess は個別の公開ディレクトリに設置されて、細かい制御を出来るもので、よく個別ディレクトリにアクセス制限を入れたりするのに使う。しかし、いくつかの Apache 指定子は、ここにも書けるし、幸いなことに Rewrite機能(正確には mod_rewrite.so)は、この .htacces
現在、WEBサーバのシェアとしてはApacheが過半数を占めています。英国Netcraft社の調査によると2016年4月におけるApacheのシェアは49.15%である(active sitesにおけるシェア。参照:Netcraft: April 2016 Web Server Surveyy)。 2位のnginxを大きく引き離しています。このような世界的に人気の高いApacheをウェブマスターとして使いこなす方法として、このホームページでは.htaccessの利用法について解説します。httpd.confに触ることのできない一般のウェブマスターさんを対象に、「アクセス制限」「カスタムエラーページの設定」「MIMEタイプの設定」など実用度の高い利用法に絞って紹介します。「何をしたいか」のかを中心に、.htaccessの利用法を説明する構成になっています。
apache 世の中にはたくさんの WWW サーバが存在しますが、 現在では文句なく apache (アパッチ) がトップシェアを誇っています。 二番手は Microsoft の IIS (Internet Information Service) でしょう。 この 2つの WWW サーバがシェアの 90% 近くを握っており、 それ以外はパっとしません。二強時代と言えるでしょう。 ここでの解説は全て apache のものですので、注意してください。 apache のインストール サーバの管理者でなくても、ローカルに WWW サーバがあるとないとでは、 便利さが大きく違います。 FreeBSD ならば、apache の port/package が用意されています。 ここでは package を使う場合、port を使う場合、ソースから コンパイルする場合、の3通りの方法を説明します。Net
限定した人々にのみ公開したい会員制ホームページを作りたい場合や、メンバー間だけで共有するファイルを置きたい場合など、ウェブサイト内の特定の領域にアクセス制限を設定したいことがあります。アクセス制限方法は多数ありますが、ユーザー名(ID)とパスワードを使うユーザー認証機能による閲覧制限方法が簡単です。 そこで本記事では、「.htaccess」という設定ファイルなどを作成して、Basic認証(基本認証)と呼ばれる認証機能をウェブサイト内に設置する方法をご紹介いたします。 アクセス制限を設定する対象のHTMLは一切修正不要です。認証の設定を書いた.htaccessファイルや、IDとパスワードを指定の書式で列挙した.htpasswdファイルを対象ディレクトリに置くだけの簡単な準備で、ログイン画面が出る秘密の会員制ホームページが作れます。 【目次】 Basic認証(基本認証)とは Basic認証(基
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く