环境配置及WordPress安装请参见:Apache+PHP+MySQL+Zend Optimizer+PHPMyAdmin本地建站小记
修改C:\WINDOWS\system32\drivers\etc\hosts
加入127.0.0.1 www.lenovo.me
修改F:\www\.htaccess,将http://localhost/blog/和http://www.lenovo.me/blog/重定向到http://www.lenovo.me
IndexIgnore */*
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.lenovo.me$ [OR]
RewriteCond %{HTTP_HOST} ^localhost$
RewriteCond %{REQUEST_URI} !^/blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /blog/$1
RewriteCond %{HTTP_HOST} ^www.lenovo.me$ [OR]
RewriteCond %{HTTP_HOST} ^localhost$
RewriteRule ^(/)?$ blog/index.php [L]
可以通过phpMyAdmin管理数据库
原文链接:https://cnlic.com/?p=78