XOOPS Cube Legacy ã® URI
XOOPS Cube ã§ãã¨æ°ã«ãªã£ã¦ããã®ã URL ãæ ¼å¥½æªãç¹ã
æ ¼å¥½æªãã ãã§ãªãããµã¤ããPHP以å¤ã®CMSã«æãããããå ´åã«ããã¼ããªã³ã¯ãåãããªã©ãããããããã¾ããã
Webãæ¯ããæè¡ -HTTPãURIãHTMLãããã¦REST (WEB+DB PRESS plus)
- ä½è : å±±æ¬é½å¹³
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2010/04/08
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- è³¼å ¥: 143人 ã¯ãªãã¯: 4,320å
- ãã®ååãå«ãããã° (183件) ãè¦ã
ãã ããã¯ãã·ã¹ãã ã§ã©ãããã¨ãããããã¢ã¸ã¥ã¼ã«ä½è ã®éã§ã®ãç´æã«ãªãã¨æãã¾ããFeature Request ã«ãä¸ãã£ã¦ãã¾ãããçµå±ãLegacy ã§ã©ãããããã®ã¯é£ããã®ã§ Wiki 㧠mod_rewrite ã®æ¸ãæ¹ãã¢ã¸ã¥ã¼ã«ãã¨ã«æ示ãã¦ããã¨ããã¨ããã«è½ã¡çãã¾ããã
ã¡ãªã¿ã« XOOPS Cube Legacy ã®ã¢ã¸ã¥ã¼ã«ã§ã¯ãããªæãã®URLã«ãªã£ã¦ãã¾ãï¼å®éã¯ã¢ã¸ã¥ã¼ã«ã«ãã£ã¦æ§ã ï¼ã
{XOOPS_URL}/modules/news/index.php?action=StoryView&story_id=112
XOOPSã®ã¢ã¸ã¥ã¼ã«ã®å ´åããã®å¤ãã¯ãã£ã¬ã¯ããªåããã¼ãã«åãprimary key ã® id ã®ä¸ã¤ã®æ
å ±ãåããã°ãã¼ã¿ãç¹å®åºæ¥ã¾ããä¸ã®ã±ã¼ã¹ã§ã¯ããã£ã¬ã¯ããªå news, ãã¼ãã«å story, primary key ã® id 112 ã¨ãªãã¾ãã
表示ç¨ã®ãã¼ãã«ãã²ã¨ã¤ããç¡ãã¢ã¸ã¥ã¼ã«ã§ããã°ããã£ã¬ã¯ããªåãprimary key ã® id ã®äºã¤ã®æ
å ±ã§äºè¶³ãã¾ãã
ããã¦ãã§ããã°ãã®URLããããªæãã«ãããã§ãããã
ä¾1) news ã¢ã¸ã¥ã¼ã« ã® story ãã¼ãã«ã® story_id=112 ã表示ããå ´å
{XOOPS_URL}/news/112
mod_rewrite å©ç¨ã®åæã§ãããå®ç¾ããã«ã¯ããã¤ããç´æã決ãã¦ã¢ã¸ã¥ã¼ã«ãä½ããã¨ã«ãªãã¾ãï¼å®ããªãã¨ãmod_rewrite ã®å¤æã³ã¼ããã¢ã¸ã¥ã¼ã«ãã¨ã«èãã¦ãã ãã ãã¨æ¸ããªããã°ãªããªãï¼ã
ã¾ãå¿ è¦ãªãç´æã¯ã
ã§ãããã®ä»ã
- mod_rewrite ã使ã£ã¦ {XOOPS_URL}/modules/news/index.php?primary_key_id=112 ã®ãããªå¤æãè¡ãã
- ãã¼ãã«ã®æå®ããªãã®ã§ story ãã¼ãã«ãæå®ããããã®ã¨ãã¦æ±ãã
- story ãã¼ãã«ã® primary keyï¼story_idï¼ã« 112 ãæå®ããããã®ã¨ãã¦æ±ã
ä¾2) newsã¢ã¸ã¥ã¼ã«ã®categoryãã¼ãã«ã®id=6ã表示ããå ´å
{XOOPS_URL}/news/category/6
- mod_rewrite ã使ã£ã¦ {XOOPS_URL}/modules/news/index.php?target_data_name=category&primary_key_id=112 ã®ãããªå¤æãè¡ãã
- ãã¼ãã«ã« category ãæå®ããããã®ã¨ãã¦æ±ã
- category ãã¼ãã«ã® primary key ã« 12 ãæå®ããããã®ã¨ãã¦æ±ã
(3)ãã¥ã¼ã¹ã¢ã¸ã¥ã¼ã«ã®storyãã¼ãã«ã®id=112ãç·¨éããå ´å
{XOOPS_URL}/news/story/112/edit
- mod_rewrite ã使ã£ã¦ {XOOPS_URL}/modules/news/index.php?target_data_name=category&primary_key_id=112&target_action=edit ã®ãããªå¤æãè¡ãã
- ãã¼ãã«ã« story ãæå®ããããã®ã¨ãã¦æ±ã
- story ãã¼ãã«ã® primary key ã« 112 ãæå®ããããã®ã¨ãã¦æ±ã
- ç·¨éï¼editï¼ã¨ãã¦æ±ãã
å®éã«ã¯ primary_key_id, target_data_name, target_action ã¯çµ±ä¸ããã¦ãã¦è¢«ããªããã°ä½ã§ãæ§ãã¾ããã
mod_rewrite ã¯å¤åãããªæãã
RewriteEngine On RewriteBase / RewriteRule ^jp/(\w+)/(\d+)$ /home/html/modules/$1/index.php?primary_key_id=$2 [L] RewriteRule ^jp/(\w+)/(\w+)/(\d+)$ /home/html/modules/$1/index.php?target_data_name=$2&primary_key_id=$3 [L] RewriteRule ^jp/(\w+)/(\w+)/(\d+)/(\w+)$ /home/html/modules/$1/index.php?target_data_name=$2&primary_key_id=$3&target_action=$4 [L]
ã¨ãããããTubsonP ã¸ã§ãã¬ã¼ã¿ã§çæããã¢ã¸ã¥ã¼ã«ã¯å¯¾å¿ã§ãããããè¿ã æ¹è¯ããäºå®ã§ãã