Apache index.php redirect for base and sub directory

I am looking to run WordPress and Magento on the same domain. WordPress is installed at the root of the site and Magento would be installed at /store/.

I have had the Apache config setup for WordPress (having all requests redirect to index.php), what Apache configuration logic do I need for all requests to /store/* to goto /store/index.php ?

Related posts

Leave a Reply

1 comment

  1. You should be able to simply keep the default Magento .htaccess file in the store directory along with the other Magento files, then exclude anything with that path from your wordpress rewrites. I’m not up to date on what wordpress .htaccess files may look like, but it should simply be a case of adding a RewriteCond.

    I would guess that the rewrite for wordpress will look something along the lines of…

    RewriteCond %{REQUEST_URI} !-f
    RewriteCond %{REQUEST_URI} !-d
    RewriteRule (.*) /index.php?$1 [QSA,L]
    

    If this is the case simply add another RewriteCond should do the trick…

    RewriteCond %{REQUEST_URI !^store/
    

    Posting the WordPress .htaccess file may lead to more accurate advice.