Traumflug Posted May 30, 2017 Share Posted May 30, 2017 Doing my first steps with PrestaShop worked pretty well. Went to http://localhost/, ran the installer, eventually started editing the theme. Ah, right, mobile users! Picked the phone to see how it looks there, connected to my desktop and ... u-oh, "This page can't be opened, because Safari can't find the server" Bummer. What happened? Well, at installation time, domain name was localhost. Installer picked this up. Shop software insists on this domain and redirects to it, even if the shop is accessed from another address. Accordingly, http://mydesktop.local gets redirected to http://localhost, which is an entirely different host on the phone, of course. A long googling session later I learned how to fix this misalignment, still I couldn't resist to teach this shop software proper manners. Domain *automatic* was born. This is how it looks in Backoffice -> Preferences -> SEO & URLs: Having it enabled means that thirty bees will no longer try to redirect traffic just because the domain is "wrong". It'll just proceed. It's turned off and works as before when an actual domain name is entered in these fields. What do you think about this feature? Useful? Might it break other use cases? Thanks for your comments. Related Github pull request: https://github.com/thirtybees/thirtybees/pull/250, it'll go into thirty bees 1.1.0, then. Link to comment Share on other sites More sharing options...
Traumflug Posted May 30, 2017 Author Share Posted May 30, 2017 P.S.: another use case is when copying a shop from one domain to another. No need to adjust shop URLs set to automatic, then. Link to comment Share on other sites More sharing options...
wakabayashi Posted May 30, 2017 Share Posted May 30, 2017 At the moment it's hard for me to imagine, how I could use this. Is it basically for local testing purposes? I use multistore... How does it work there? Link to comment Share on other sites More sharing options...
Traumflug Posted May 30, 2017 Author Share Posted May 30, 2017 In multistore this applies to the first shop. All defined domains load their related shop, all other domains load the first shop. Maybe this feature makes using multistore obsolete in some cases, because defining multiple URLs just to make one shop accessible from multiple domains is no longer necessary. Link to comment Share on other sites More sharing options...
Havouza Posted May 30, 2017 Share Posted May 30, 2017 But that not really what multistore is about is it.... Link to comment Share on other sites More sharing options...
MockoB Posted May 30, 2017 Share Posted May 30, 2017 I lost couple of days figure it out how to connect to my home server with other device. Then I finally assigned ip of the server in the router and added that ip in those fields above. It would be nice feature to have for dumbs like me :) Link to comment Share on other sites More sharing options...
Havouza Posted May 30, 2017 Share Posted May 30, 2017 @Traumflug Would it be usable in this scenario? I create a standard "tb in a box", back it up, and restore it in another domain. Simsalabim, working Link to comment Share on other sites More sharing options...
Traumflug Posted May 30, 2017 Author Share Posted May 30, 2017 I create a standard “tb in a box”, back it up, and restore it in another domain. Simsalabim, working Yes, absolutely! Link to comment Share on other sites More sharing options...
Havouza Posted May 30, 2017 Share Posted May 30, 2017 That would be useful! Link to comment Share on other sites More sharing options...
Traumflug Posted June 6, 2017 Author Share Posted June 6, 2017 The pull request got merged! Now it's an official, upcoming feature :-) Link to comment Share on other sites More sharing options...
Havouza Posted June 6, 2017 Share Posted June 6, 2017 For 1.0.2 or 1.1.0? Link to comment Share on other sites More sharing options...
dprophitjr Posted June 6, 2017 Share Posted June 6, 2017 How can this help out https://github.com/thirtybees/vagrant if we tell vagrant to package it up as a vm box to move elsewhere? @mdekker Modify the installer params? Link to comment Share on other sites More sharing options...
Traumflug Posted June 6, 2017 Author Share Posted June 6, 2017 Teaching the installer to use *automatic* as default value is certainly possible. Maybe it's even better, because it keeps the shop working for those who don't know about these SEO & URL settings, yet. Link to comment Share on other sites More sharing options...
roband7 Posted June 6, 2017 Share Posted June 6, 2017 Why not just make the automatic logic the one and only way this is done? I'm trying to understand the use case for not doing this automatic, does one exist? Link to comment Share on other sites More sharing options...
Traumflug Posted June 7, 2017 Author Share Posted June 7, 2017 It has always been this way, so it has to be right :-) I think the original idea was to avoid duplicate content. Y'know, like www.shop.com vs. shop.com, such stuff. Both get searched by search engine spiders and whoops, two sites instead of one. Then this stuff gets compared and dumb engines detect one shop stealing content from another. Also, having visitors spread over two domains produces links to either of these pages elsewhere and as links pointing to the shop are crucial for site ranking, it's a loss for both sites. Such stuff can be done in .htaccess, of course, but a few years ago presence of mod_rewrite wasn't a matter of course, so one couldn't rely on this. Now this redirecting is buried pretty deeply all over the code and can't be removed easily. Redirects happen everywhere, links get added everywhere, all of them absolute links. Also, some code for writing a proper .htaccess section (think of multishops, too) is required, of course. Link to comment Share on other sites More sharing options...
Traumflug Posted June 7, 2017 Author Share Posted June 7, 2017 Not to forget: multishops use the domain name to find out with which shop they should answer incoming requests. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now