I have a site in root folder which has its own .htaccess file. There is also a WordPress installed in a separate wordpress folder with its own .htaccess. I’m trying to target WordPress category directly from the main site but with the prettier URL. I want when I type
mydomain.com/blog/
to take me to the
mydomain.com/wordpress/category/blog/
I have tried to put rewrite rule to the .htaccess file in the main site, like this
RewriteRule ^blog/?$ wordpress/category/blog/
but it breaks and show error “The requested URL /blog/ was not found on this server.“. It seems that the second .htaccess file in wordpress folder or something else breaks it.
I don’t think this is possible (as has been pointed out in the comments) unless you redirect the browser to the full WordPress URL:
The only other way to get this working is to change the WordPress PHP files yourself to handle this specific kind of redirect.