AntonioVidal's avatar

Multiple DNS pointing to one Laravel installation (no a subdomain question)

Hello all!

I have a server with Laravel running (in one.com). This server has a DNS and it's working. Let's call this server DNS A.com.

Now I want others DNS, B.com and C.com to point to A.com without changing the url (these DNS are in godaddy).

I already accomplished this with DNS masking , but all the links in the web page links to "A.com/myroute" instead "B.com/myroute" despite of at the url "B.com" is shown.

In fact, if I enter in that link (A.com/myroute from B.com) the route works (go to myroute) but the url is still B.com without any "slash".

The second problem is related. When I try to put B.com/myroute, a 404 code is returned to me.

I searched on the web and I saw something like:

Route::group(['domain' => 'B.com'], function() {
    Route::get('/myroute', function () {
        return view('myroute/myroute');
    });
});

I searched for this on the net, there is similar situations but any of them worked out.

I hope you can help me and thank you for your attention.

0 likes
0 replies

Please or to participate in this conversation.