Jump to content
thirty bees forum

Recommended Posts

Posted

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:

0_1496156237047_upload-3f9aadd1-115d-4bdd-b44e-515d9537ee93

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.

Posted

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.

Posted

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 :)

Posted

@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

Posted

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?

Posted

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.

Posted

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?

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...