So I'm setting up a Magento installation off the back of a WordPress installation; so at:
- root.level/ is WordPress
- root.level/shop/ is Magento
All elements of the website, except the catalogue are being handled through WordPress. Magento only deals with the catalogue.
The website is to be completely localised for the UK, rest of Europe and US markets. On WordPress, I've achieved this effectively using the qTranslate plugin, so all the following are working:
- root.level/uk/
- root.level/eu/
- root.level/us/
In Magento, I've created 3 storefronts and using the configuration I've managed to make them appear as:
- root.level/shop/uk/
- root.level/shop/eu/
- root.level/shop/us/
However, for consistency I would prefer for the 1st URL segment to always represent the locality. I have therefore written the following to the root (WordPress installation) htaccess:
#shop moves
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([a-z][a-z])/shop/(.*)[/]{0,1}$ /shop/index.php?___store=$1 [L]
RewriteRule ^([a-z][a-z])/shop[/]{0,1}$ /shop/index.php?___store=$1 [L]
</IfModule>
Which has the desired effect in so much as root.level/uk/shop/ will load up the UK magento storefront homepage, and root.level/uk/shop/xyz.html has the desired behavior. The problem is that the links on the store page are still pointing to root.level/shop/xyz.html. How do I go about making the links reflect the rewritten URLs?
I've tried going in to Magento Admin-->System-->Config, setting the scope to the relevant store front then under Web changing the "Link URL" (under both Secure and Insecure) and while this corrects the links it makes every page 404 (including the homepage) on that storefront. Is there somewhere I need to edit Magento's URL reading behavior?
Edit: So this is weird. I've got it working on /eu/shop/ and /us/shop/ but /uk/shop/ is still returning 404s. I thought it was because the UK was set to default but changing that doesn't seem to affect things. Any ideas?