ãã¡ã¤ã³ã5509.meã«ç§»è»¢ããã®ã§ãWordPressã»ãªãã¤ã¬ã¯ãã®è¨å®ã¡ã¢ãªã©
ãããããã¡ã¤ã³ã http://moto-mono.net/ ãã https://5509.me/ ã«ç§»è»¢ãã¾ããããã¡ã¤ã³ã®ç§»è»¢ã¨ãããã¨ã§ã念ã®ããåã®ãã¼ã¿ã¯å ¨ã¦æ®ãã¤ã¤ãhtaccessã§æ°ãããã¡ã¤ã³ã«ãªãã¤ã¬ã¯ããã¦ãã¾ãããã®è¾ºã®ã¡ã¢ãè²ã ãã£ããã£åãå¿ããã®ã§ãç»åãå ¨ç¶ãªãã¦æå³ããããªããããããªãã§ããã¿ã¤ãã«ã«ãããéããWordPressã§ã®ãã¼ã¿ç§»è»¢ãå«ãã¦æ¸ãã¾ããã
æºå
1. æ°ãããã¡ã¤ã³ï¼ãã£ã¬ã¯ããªï¼ã«WordPressãã¤ã³ã¹ãã¼ã«ãã¦ãã
ãã®ã¾ã¾ãªãã§ããã©ãå ã«ã¤ã³ã¹ãã¼ã«ãã¦ããã¾ãããã¬ãã£ã¯ã¹ï¼ãã¼ãã«æ¥é èªï¼ã¯åºæ¬çã«ä»¥åã®ããã°ã¨åããã®ã§å¤§ä¸å¤«ã§ãããåãDBã使ãå ´åã¯ãã¨ãã¨ç½®æãããã¬ãã£ã¯ã¹ã«ãã¦ããã¾ããããã§ã¯gogo09_ã
2. wp-contentãã³ãã¼ãã¦ãã
ãã¼ãã¨ããã©ã°ã¤ã³ãã¢ãããã¼ãããç»åãã¡ã¤ã«ãªã©ããããå ¥ã£ã¦ããã®ã§ãããã¢ãããã¼ããã¦ããã¾ãã
3. ãã¼ã¿ãã¾ãã£ã¨ããã¯ã¢ãã
ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ãã¯WordPress Database Backupã§ã
Redirectionã使ã£ã¦ããã®ã§ããããã®Redirectionã®ãã°ããã»ã¿ããã«å®¹éï¼6MBå¼·ï¼ã大ããã£ãã®ã§ããã ããã§ãã¯å¤ãã¾ããã
4. ãã¬ãã£ã¯ã¹ãç½®æãã
ããããéãDBã使ãå ´åã¯ãã®ã¾ã¾ã§åé¡ãªãã§ãããä»åã¯åãDBã使ã£ã¦ããã®ã§ããã¬ãã£ã¯ã¹ãç½®æãã¾ããããã¦ã³ãã¼ãããããã¯ã¢ããSQLãã¼ã¿ãããã¹ãã¨ãã£ã¿ã§éãã¦ï¼ã·ã³ã¿ãã¯ã¹ãã¤ã©ã¤ãã¯ãªãã«ããªãã¨å¤§å¤ãªãã¨ã«ãªãã¾ãï¼ãä¸çºç½®æã§ããã§ãã
ânext_â >> âgogo09_â
ãã¼ã¿ã®åãè¾¼ã¿ããWordPressã¸ã®é©ç¨
1. ããã¯ã¢ãããã¼ã¿ãã¤ã³ãã¼ããã
ãã¬ãã£ã¯ã¹ç½®ææ¸ã¿ã®ãã®ãã¤ã³ãã¼ããã¾ããã¤ã³ãã¼ãã¯phpMyAdminã®Importããè¡ãã¾ããã
2. ãã¡ã¤ã³ãæ¸ãæãã
è¨å®ãå¤ããã¡ã¤ã³ã®ã¾ã¾ã«ãªã£ã¦ããã®ã§ãã¾ãã¯DBãæ¸ãæãã¾ãããã¡ã¤ã³è¨å®ã¯ããã¬ãã£ã¯ã¹_optionsã«å«ã¾ãã¦ãã¾ãã
Browseããä¸è¦§ã表示ãã¦siteurlã®é ç®ã®å¤ãæ°ãããã¡ã¤ã³ã«æ¸ãæãã¾ãã
3. WordPressã«ã¢ã¯ã»ã¹ãã
http://æ°ãããã¡ã¤ã³/wp-admin ããWordPressã«ã¢ã¯ã»ã¹ãã¾ããããã¨ãã¼ã¿ãæ´æ°ããã¦ãä¸èº«çãã ããããªããã°ã«ãªã£ã¦ããã¯ãã§ãã
3-1. åºæ¬è¨å®ã®WordPressã®å ´æãå¤æ´ãã
ä¸ã®ã»ãã§ãããæ°ãããã¡ã¤ã³ã«å¤ãã¾ãã
3-2. ã¢ãããã¼ããã¡ã¤ã«ãå¤æ´ãã
ãããæ°ãããã£ã¬ã¯ããªã«å¤ãã¦ããã¾ãã
4. è¨äºãªã©ã«å«ã¾ããå¤ããã¡ã¤ã³ãæ°ãããã¡ã¤ã³ã«æ¸ãæãã
ããã¯Search Regexã¨ãããã©ã°ã¤ã³ã使ãã¨ç°¡åã«æ¸ãæãããã¨ãã§ãã¾ãã
æ¤ç´¢ããã¨ããã£ã¨åºã¦ããã®ã§ãSearch patternã«æ¤ç´¢èªãReplace patternã«ç½®æãããã®ãå ¥ãã¦Replate & Saveãã¿ã³ãã¯ãªãã¯ãããã¨ã§ä¸çºç½®æã§ãã¾ãã
ããã¾ã§ã§ãæ°ãããã¡ã¤ã³ä¸ã§ä»ã¾ã§ã®ãã¼ã¿ãæã£ãããã°ãã§ãã¾ããã
(5.) ãã¼ããªã³ã¯ã®å¤æ´
ãã¡ã¤ã³ãå¤ãããã¨ã«ãããã¦ãè¨äºã®ãã¼ããªã³ã¯ãå¤æ´ãã¾ããããªããé·ãã£ã・・・
ä»ã¾ã§ã®ãã¼ããªã³ã¯ï¼/%year%/%month%/%day%/%postname%.html
æ°ãããã¼ããªã³ã¯ï¼/log/%postname%
ã ãã¶ãã£ããï¼
mod_rewriteã使ã£ããªãã¤ã¬ã¯ãã®è¨å®
ãã®ã¾ã¾ã ã¨è«¸ã ç»é²ããã¦ããå¤ãããã°ã®ã»ãã«ã¢ã¯ã»ã¹ãéã¾ã£ã¦ãã¾ãã®ã§ãæ°ããããã°ã¸ãªãã¤ã¬ã¯ããè¨å®ãã¾ããhtaccessã§mod_rewriteã®æå®ãè¡ãã¾ãããã¡ã¤ã³ãå¤ããã®ã§ãæä¹ çãªãªãã¤ã¬ã¯ãã«ãªããã¹ãã¼ã¿ã¹ã³ã¼ãã¯301ã使ãã¾ãã
mod_rewriteã®æå®æ¹æ³ã¯ãURLã®æ¸ãæã Rewriteããåèã«ãã¦ãã ããã
RewriteRule ([^\/\.]+)\.html$ https://5509.me/log/$1 [R=301,L] RewriteRule index.php https://5509.me/ [R=301,L] RewriteRule ^(feed|about|labs)$ https://5509.me/$1 [R=301,L] RewriteRule ^(tag|category)(\/.*)$ https://5509.me/$1$2 [R=301,L] RewriteRule ^([0-9]+)(\/[0-9]+)? https://5509.me/log/$1$2 [R=301,L]
1è¡ç®ã¯ãæ§è¨äºURLããæ°ããURLã¸ã®ãªãã¤ã¬ã¯ãã
2è¡ç®ã¯ãããããã¼ã¸ã®ãªãã¤ã¬ã¯ãã
3è¡ç®ã¯ããã¼ã¸ã¨feedã®ãªãã¤ã¬ã¯ãã
4è¡ç®ã¯ãã¿ã°ã¨ã«ãã´ãªãã¼ã¸ã®ãªãã¤ã¬ã¯ãã
5è¡ç®ã¯ãã¢ã¼ã«ã¤ããã¼ã¸ã®ãªãã¤ã¬ã¯ãã
è¨äºURLã®ãªãã¤ã¬ã¯ã
éè¦ãªã®ã¯1è¡ç®ãªã®ã§ãããã ã解説ãã¦ããã¾ãããã¨ãã°ãè¦ç´ ããµãã£ã¨è¡¨ç¤ºããããã®URLã¯
https://5509.me/2010/04/30/whatinout.html
ã§ãããæ°ããURLã®ã«ã¼ã«ã¯
https://5509.me/log/whatinout
ã«å¤ããã¾ããå ±éããç®æã¯å¤ªåã«ãªã£ã¦ããã¨ãããªã®ã§ããã®é¨åãæ£è¦è¡¨ç¾ã§åå¾ãã¾ããæ£è¦è¡¨ç¾ã¯
([^\/\.]+)\.html$
ã«ãªããï¼ï¼ã§åå¾ããé¨åã$1ã§åå¾ã§ããã®ã§ãªãã¤ã¬ã¯ãã®URLã¯
https://5509.me/log/$1
ã¨ãªãã¾ãã
ã«ãããããªã£ã¦ãã¾ããåºæ¬çã«æ£è¦è¡¨ç¾ã使ããã¯ãã§ããããã«ããã¯apacheã®ãã¼ã¸ã§ã³ã1.3.xxç³»ã ã£ãã®ã§ \d{2} ã¨ãã使ãã¾ããã§ããã
Google Analyticsãªã©ä½¿ã£ã¦ãããµã¼ãã¹ã®ãã¡ã¤ã³å¤æ´ãªã©
æå¾ã«ã使ã£ã¦ãããµã¼ãã¹ã®ãã¡ã¤ã³ãå¤æ´ãã¦ããã¾ãããããçµæ§å¤ãã¦å¤§å¤ã§ããããã
ããã«ãã¦ã
å ¨é¨ã®æ°åã0ã¨ãæ°é®®ã§ãã・・・ãªãã¨ãªãè¨å¿µã«ãã£ããã£ããã
ãã¿ãããªãããªãã・・・ï¼