Traumflug Posted May 30, 2017 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.
Traumflug Posted May 30, 2017 Author 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.
wakabayashi Posted May 30, 2017 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?
Traumflug Posted May 30, 2017 Author 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.
Havouza Posted May 30, 2017 Posted May 30, 2017 But that not really what multistore is about is it....
MockoB Posted May 30, 2017 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 :)
Havouza Posted May 30, 2017 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
Traumflug Posted May 30, 2017 Author 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!
Traumflug Posted June 6, 2017 Author Posted June 6, 2017 The pull request got merged! Now it's an official, upcoming feature :-)
dprophitjr Posted June 6, 2017 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?
Traumflug Posted June 6, 2017 Author 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.
roband7 Posted June 6, 2017 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?
Traumflug Posted June 7, 2017 Author 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.
Traumflug Posted June 7, 2017 Author Posted June 7, 2017 Not to forget: multishops use the domain name to find out with which shop they should answer incoming requests.
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