how to redirect from htaccess /en/blog to a folder located at ./blog

Rate this post

I have a store in pretashop 1.6 with url in the root of the project I have a folder called blog that contains a wordpress, to view the blog, the url is as follows, I need it to be

I have tried the following:

  • Put the blog in a folder ./en/blog, from htaccess add the 301 redirect from /blog to /en/blog, I have changed in the wordpress database the references from */blog to */en/blog and it works correctly, but the prestashop store does not work, since when entering throws an access denied error.

I think what I need to do with htaccess is that when I search for /en/blog/ the folder I read is /blog even if the url shows /en/blog/, but I can’t know how to do it.

How can I do it? Can you think of an idea?

Thank you very much for your answers



based on this documentation I put an example of how I think the .htaccess can work, also refresh the permanent links in WordPress and save again.

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

#END WordPress

Leave a Reply

Your email address will not be published.

Back to top button