Unable to upgrade zencart because wordpress is not allowing to access subfolder

情到浓时终转凉″ 提交于 2019-12-13 20:23:43

问题


Okay,

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.

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.

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.

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>`

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

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.


回答1:


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]

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.



来源:https://stackoverflow.com/questions/48809023/unable-to-upgrade-zencart-because-wordpress-is-not-allowing-to-access-subfolder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!