Beta858 Posted November 29, 2016 Share Posted November 29, 2016 Hi, I need some help. Can someone tell me how can I redirect this link: http://www.stolarijamraz.com/shop/gorenje-m-41.html?page=14&sort=2a&language=en to this one: http://www.stolarijamraz.com/shop/gorenje-m-41.html?page=14&sort=2a&language=hr Or, if no one knows, how to just add hr on the end, like this: http://www.stolarijamraz.com/shop/gorenje-m-41.html?page=14&sort=2a&language=en=hr Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 29, 2016 Share Posted November 29, 2016 If you are going to redirect the link, it would mean you don't need the language. In that case, just delete the English languages in admin and delete the english.php and english directory in the languages directory. The default language will be loaded automatically. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Beta858 Posted November 29, 2016 Author Share Posted November 29, 2016 The problem is that currently I don't need the english site, but this redirection is just temporary, so in the future, I'll still be needing the english version as well. Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 29, 2016 Share Posted November 29, 2016 I haven't tested this but I think it will work. But I don't think it is needed. If you remove the language files as mentioned, the code should use the default files. Then when you are ready to make the language available, just rename them back. That way the ulr's will not have to be redirected again, which they will be if you use this method. RewriteRule ^en/(.*)$ http://www.stolarijamraz.com/shop/$1'>http://www.stolarijamraz.com/shop/$1 [L,R=301] RewriteRule ^hr$ http://www.stolarijamraz.com/shop [L,R=301] Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
MrPhil Posted November 30, 2016 Share Posted November 30, 2016 I don't think there's going to be any easy way to do it in .htaccess. The language=en is in the URL Query String, so you won't see it in a RewriteRule. You don't want to simply replace the Query String (by hard coding it in a RewriteRule) because there's other stuff in the UQS. Using the QSA flag might work -- you'd have to test your server to see if the new (hard coded) ?language=hr overrides the old language=en, en overrides the hr, or both show up. I'm not sure if there are consistent rules. Since this is only temporary, it would be a lot easier to follow Jack's instructions to temporarily disable English. Evidently, osC still needs better control over the default language: to use the visitor's browser setting, or put something in the database or configure file. Provision might be made for choosing a "best guess" based on geolocation (IP address). Admin and catalog should be treated differently. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.