无法升级Zencart,因为Wordpress不允许访问子文件夹 [英] Unable to upgrade zencart because wordpress is not allowing to access subfolder

查看:146
本文介绍了无法升级Zencart,因为Wordpress不允许访问子文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧

我有一个wordpress系统 https://example.com ,一切正常.基本上我也已经在系统中安装了禅宗购物车. https://example.com/shopcart/是禅宗购物车的网址.

I have a wordpress system https://example.com, everything works fine. Basically I also have zen cart installed in the system. https://example.com/shopcart/ is the url for zen cart.

我正在尝试将zencart升级到最新版本.为此,我已经备份了文件和数据库. 我已经将最新版本的zencart文件上传到 https://example.com/test/,并且在尝试时加载 https://example.com/test/zc_install/我被重定向到404页面

I am trying to upgrade zencart to the latest version. For which, I have backed up the files and database. I have uploaded the latest version zencart files to https://example.com/test/ and when I try to load https://example.com/test/zc_install/ I am redirected to a 404 page.

404页面的<title></title>表示未找到Test Zc_Install的内容".我确信wordpress正在寻找以此名称命名的文章.我已经尝试了许多解决方案,但是没有用.

The <title></title> of the 404 page says 'Nothing found for Test Zc_Install'. I am sure wordpress is looking for an article by this name. I have tried many solutions, but it is not working.

下面是我的.htaccess:

Below is my .htaccess:

`<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>`

系统使用永久链接.永久链接设置为自定义结构: http://example.com/%post_id%/%职位名称%/

The system uses permalinks. The permalink is set to custom structure: http://example.com/%post_id%/%postname%/

我知道wordpress首先会加载根index.php文件并准备查询.是否可以暂时停止wordpress行为并允许我访问URL https://example.com/test/zc_install/吗?

I know that wordpress loads the root index.php file first and prepares the query. Is it possible to temporarily stop wordpress behaviours and allow me to access the URL https://example.com/test/zc_install/ ?

任何帮助将不胜感激.谢谢.

Any help would be extremely appreciated. Thank You.

推荐答案

当您的所有请求进入网站根目录时,WordPress apache重写会捕获您的所有请求.

The WordPress apache rewrite is catching all of your requests when they come into the website root directory.

您可以在重写规则"的顶部添加以下内容:

You could add the following to the top of your Rewrite Rules:

RewriteEngine On
RewriteBase /
# add this line to ignore all re-writes within the TEST folder.
RewriteRule ^test - [L,NC]

这将忽略包含test/目录的所有请求.然后,我建议您在Zen基本文件夹内添加一个单独的.htaccess文件,以从那里处理任何智能SEO mod等,而不要在可能的情况下使主.htaccess文件混乱.

This will ignore all requests which contain the test/ directory. I would then suggest that you add a separate .htaccess file within your Zen base folder to handle any smart SEO mods etc from there, rather than cluttering your main .htaccess file if possible.

这篇关于无法升级Zencart,因为Wordpress不允许访问子文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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