http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html ãè¦ãªããã URLãæ£è¦è¡¨ç¾(A)ã«ãããããã㤠æåå(B)ãæ¡ä»¶(C)ãæºããå ´åã«ã URLã(D)ã«æ¸ãæããã ã¨ããã®ãåºæ¬ã RewriteRule URLã(A)ã®æ£è¦è¡¨ç¾ã«ãããããã(D)ã§æ¸ãæããã æ£è¦è¡¨ç¾(A)ã¯ããªã©ã¤ããå®è¡ãããã©ããã®æ¡ä»¶(çå½å¤)ã§ãã£ã¦ãç½®æ url =~ s/(A)/(D)/ ã¨ãããã¨ã§ã¯ãªãããã¨ãã°ã以ä¸ã®ãããªæ£è¦è¡¨ç¾ã§ãªã©ã¤ããããã Google Code Search # 1æåãããããããªã©ã¤ãå®è¡ã空æååã§ãªããã°å®è¡ããã RewriteRule . index.php [L] Google Code Search # å é ã«ãããããããªã©ã¤ãå®è¡ã常ã«å®è¡ããã RewriteRule ^ -
å ¬å¼ããã¥ã¡ã³ãã¨ã¯éãåãå£ã§ã®ç¢ºèªããã¦ããããããããªã¨ãç´°ããããªã¨ã¼ã·ã§ã³ã«ã¤ãã¦ã¯ãæ°ãåããã追è¨ããããããã¾ããã Rãã©ã°ã¨PTãã©ã°ã¨aliasã®é¢ä¿ ãµã¼ãã³ã³ããã¹ãã¨ãã£ã¬ã¯ããªã³ã³ããã¹ã ãã¡ã¤ã³ããµããã¡ã¤ã³ããããã³ã«çã®æ±ã Rãã©ã°ã¨PTãã©ã°ã¨aliasã®å¾®å¦ãªé¢ä¿ ããæ¡ä»¶ä¸ã§ãfooã«å¯¾ãããªã¯ã¨ã¹ããbarã¨ãã¦å¦çãããããå¥ãªçç±ã§barã¸ã®ãªã¯ã¨ã¹ãã¯DocRootå¤ã§å¦çãããã¨ãã£ãã¨ããbarããpath/to/real/barã¸ã®aliasãç¨æãã¦ãããfooããbarã¸ã®RewriteRuleãããã°ãåä½ãããã§ãããã¨ãã°ä¸è¨ã®ããã«ã RewriteRule /foo /bar Alias /bar /path/to/real/barã¨ããããããã¯ãã¾ãåä½ãã¾ãããRewriteRuleãé©ç¨ãããå¾ãåºæ¬çã«mo
ããã«ã¡ã¯ãéçºé¨ã®æ± éã§ãã æ¢ã«è²ããªã¨ããã§çºè¡¨ãã¦ãã¾ãããã©ã¤ããã¢ã§ã¯Webãµã¼ãã¨ãã¦æ®ãã©ã®ãµã¼ãã¹ã§Apacheã使ç¨ãã¦ãã¾ãã Apache ã®ç¹å¾´ã¨ãã¦ãã¢ã¸ã¥ã¼ã«ã«ããæ©è½ã®è¿½å ãæåã®å¶å¾¡ãããã¾ãããã®ä¸ã§ãããå©ç¨ããã¦ããªãããæ·±ã使ã£ã¦ããã¨ãããã©ãããè¬ã®æ©è½ã®å¤ãã¢ã¸ã¥ã¼ã«ã¨ã㦠mod_rewrite ãããã¾ããApacheã®å ¬å¼ãµã¤ãã§ã以ä¸ã®ããã«æ¸ããã¦ããäºããããæ¬å®¶ã§ããã®ç¹ã«ã¤ãã¦ã¯èªãã¦ããã¨ããäºã§ãããã ä»åã¯ãã㪠mod_rewrite ã®ã¡ãã£ã¨ããã¢ãã¯ãªæ¡å¼µæ¹æ³ã«ã¤ãã¦ç´¹ä»ãããã¨æãã¾ãã Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo. å¤æ°ãå©ç¨ããããã°ã©ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}