配置 WordPress .htaccess 以查看子文件夹 [英] Configuring WordPress .htaccess to view subfolders

查看:28
本文介绍了配置 WordPress .htaccess 以查看子文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有 .htaccess 文件的 WordPress 安装,如下所示:

I have a WordPress installation with an .htaccess file that looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

我尝试将 WordPress 的新副本安装到单独博客的子目录中,但当我尝试查看它时,在根 WordPress 中出现 404 错误.我假设这是因为 .htaccess 文件.

I tried installing a fresh copy of WordPress into a subdirectory for a separate blog and am getting 404 errors within the root WordPress when I try to view it. I'm assuming this is because of the .htaccess file.

如何更改它以便我可以查看子文件夹?

How do I change it so that I can view the subfolder?

推荐答案

为了将来参考,你可能想试试这个:

For future reference, you may want to try this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog2/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog2/index.php [L]
</IfModule>
# END WordPress

这篇关于配置 WordPress .htaccess 以查看子文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆