Jump to content
thirty bees forum

Request For Comment: automatic domain feature


Traumflug

Recommended Posts

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.

Link to comment
Share on other sites

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

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

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

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...