This domain is registered at Dynadot.com. Website coming soon. akijapan.com 2024 著作権. 不許複製 プライバシーポリシー
[Apache] RewriteCondディレクティブでRewriteRuleの条件を設定できます。複数の条件を設定することが可能。 ※RewriteCondの前にRewrite Engine On とする必要があります。 [書式] RewriteCond テストする変数 パターン [フラグ] フラグには[NC]もしくは[OR]を指定できます。フラグを二つ設定するにはカンマで区切ります。(例: [NC, OR] [NC] - 大文字小文字を区別せずにパターンと一致するかどうかをテストします。 [OR] - いずれかのRewriteCondにあてはまる場合にRewriteRuleを適用します。[OR]を明示しない場合、自動でANDになります。 テストする変数には以下のようなものが使用できます。 HTTP_USER_AGENT HTTP_REFERER HTTP_COOKIE HTTP_FOR
mod_rewriteとは Apacheのモジュールのひとつで、アクセスURLを正規表現で書き換えることができます。リダイレクト処理を行うのに便利なモジュールです。 モジュールの解説ドキュメントによれば URLを操作するためのスイス製のアーミーナイフ と例えられるほど、非常に複雑な処理を行えます。 URLからURLへ、同一サーバ内URLだろうが、別サーバURLだろうが問いません。 引数を含む動的URLを通常のHTMLファイルのような静的URLに見せることも可能です。 素晴らしく詳細なマニュアルもありますが、機能が多いだけに情報量が多く読むのも面倒だと思いますので、ここでは、mod_rewriteを使用すると便利な場面を想定して具体的に解説してみたいと思います。 mod_rewriteの基本 ひとまず、mod_rewriteはApacheのモジュールです。インストールされていなければ、サーバ
Summary The mod_rewrite module uses a rule-based rewriting engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch. mod_rewrite provides a flexible and powerful way to manipulate URLs using an unlimited numbe
id: 167 所有者: msakamoto-sf 作成日: 2009-02-08 20:43:38 カテゴリ: Apache mod_rewriteのRewriteBaseを完全に誤解していたのでメモ。 参考: "mod_rewrite モジュール URL 書き換えエンジン" http://www.net-newbie.com/trans/mod_rewrite.html "A Users Guide to URL Rewriting with the Apache Webserver"(日本語) http://japache.infoscience.co.jp/rewriteguide/ 嵌った時の条件 DocumentRootにmod_rewriteを設定。 "/dir1/$1/$2" という感じのURLを、"/cgi-bin/index.pl?p1=dir1&p2=$1&p3=$2
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く