mod_rewrite:RewriteCondの動作フロー

Apache, Webサーバ, mod_rewrite

08:51:36, by dozo Email , 13 words, 7270 views   Japanese (JP) del.icio.us

調べてみると意外と知らないものだな。

(ノ・・)ン。。。。。。(((●コロコロッ

mod_rewrite, RewriteCond, RewriteRule

  1. 上から順番にRewriteRuleに従って書き換えを行う
  2. Ruleが一致した場合、かつ直前にRewriteCondがあった場合、条件文を確認し条件文に合致していると書き換えを行う

_〆(。。)メモメモ…

[More:]



RewriteRuleやRewriteCondって一見するとプログラミング言語みたいで、
感覚的にif~elseっぽく扱ってしまう。
あまりにも書いた内容通りに動かなくて調べてみると全然違っててビックリ。

RewriteCondが動作するのは、
直後にあるRewriteRuleにURLが一致した時のみだったんだな。




今更ながら、mod_writeってあくまでURL書き換えが目的なんだと思い知らされた。

Trackback address for this post:

http://hain.jp/htsrv/trackback.php/224

Comments, Trackbacks:

No Comments/Trackbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

powered by b2evolution

shinobi

Neighbors
Relative
Favorites
PR

極論istの技術屋を始めて早幾年。 流れの速い業界の波にもまれながらも精一杯生きている様をとくとごらんあれ。

Archives
スポンサー

Latest bookmark
Search

Categories

Who's Online?
Misc
Syndicate this blog XML

Valid XHTML 1.0! Valid CSS! Valid RSS 2.0! Valid Atom 1.0!