Julien Posted June 10 Share Posted June 10 Dear all, We are about to expand to multiple countries and we'd like the following link structure (where "cc" is the country code): https://www.example.com/cc/store/product-group We already easily achieved this for our custom pages but we are not able to find the correct RewriteRule for this. We did try the following with no success: RewriteRule ^(re|mu|fr)/store/(.*)(/?)$ index.php?country=$1&rp=store/$2 [L] It causes a 404 error when accessing any link under /re/, /mu/ or /fr/. But if I go to the following link, it does show the correct page: https://www.example.com/index.php?country=re&rp=store/product-group I tried reaching out to WHMCS support but they advised to post here, so here I am. I hope my post makes sense and I'd love to hear your thoughts about it! Thanks : ) 0 Quote Link to comment Share on other sites More sharing options...
WhmTools Posted June 16 Share Posted June 16 Hello, You will have different products based on country? Or it will be just currency difference based on country? 0 Quote Link to comment Share on other sites More sharing options...
Julien Posted June 17 Author Share Posted June 17 Dear WhmTools, It's the same product and same currency, just we'll do some changes on the product page to add some messages relevant to the country for SEO purposes. Thanks. 0 Quote Link to comment Share on other sites More sharing options...
WhmTools Posted June 17 Share Posted June 17 Is mod_rewrite enabled already? Can you just try this simple rule in your .htaccess, to make sure the .htaccess rules will work as expected? RewriteEngine On RewriteRule ^my-cart/?$ cart.php [L] then try to load website.com/my-cart and is it showing the whmcs cart page? 0 Quote Link to comment Share on other sites More sharing options...
Julien Posted July 2 Author Share Posted July 2 Hello, It is enabled. I ended up rewrite to a custom .php which rewrites $_SERVER['REQUEST_URI'] and $_SERVER['REDIRECT_URL'] before reincluding WHMCS's index.php. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.