【发布时间】:2013-07-27 18:25:58
【问题描述】:
我是 wordpress 和服务器管理员的新手, 我刚刚在本地目录的子文件夹中安装了一个 wordpress 博客。但我在配置 .htaccess 时遇到问题。安装 wordpress 的文件夹名为 onlifestyle,位于根目录中。 我的网址具有以下形式: http://onlifestyle.org/onlifestyle/health/basic-principles-of-proper-nutrition 反而 http://onlifestyle.org/health/basic-principles-of-proper-nutrition 我的根 .htaccess 是:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?onlifestyle.org$
RewriteRule ^(/)?$ onlifestyle/$1 [NC,L]
wordpress .htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /onlifestyle/index.php [L]
</IfModule>
#END WordPress
我使用永久链接:
http://onlifestyle.org/onlifestyle/%category%/%postname%
我应该如何配置wordpress以跳过url中子目录的名称
【问题讨论】:
标签: wordpress apache .htaccess