0

I have a Magento 2.3.1 site installed in a subfolder and I have a problem with base URL. When I have a link like this < a href="#" > LINK < /a > Instead of this www.domainname.com/subfolder/# I got a wrong redirect to www.domainname.com/#

This occurs only when I enable a theme I purchased (Porto Theme), with default Magento 2 this issue not occur.

I wrote to Porto Theme support but they told me that they tried to find out what/where the issue was but did not succeed.

My base URL configuration (secure and insecure) are correct, folder permission is right and mod_rewrite in my server is enabled.

In essence if in a link there is href="#" like in the remove product from cart button the site with Porto Theme enabled redirects always and in any case to the root.

What can be the issue?

Thanks in advance

  • I tried to move the site to the root too but the issue remains. For exampe if you add a product to the cart and then from cart you want to remove the product, the site redirect always to www.domainname.com/# instead to www.domainname.com/path/# – DanMar May 23 at 11:38
0

You can try this in .htaccess file for your subfolder:

Options +FollowSymLinks -MultiViews
RewriteEngine on

RewriteCond %{THE_REQUEST} /subfolder/(\S+)
RewriteRule ^ /%1 [L,R]
  • Thanks, I tried with no success. – DanMar May 24 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.