Subdomain redirect puzzle

Soldato
Joined
18 Oct 2002
Posts
10,123
Ok, might not be a puzzle for someone who knows what they're doing but atm without taking down a live site and testing my theory, I need a bit of help getting my head around if this is possible.

So i have been asking by a client, to do the following (if possible)

Website A (on a custom built Laravel CMS with a client login to a user area)
Website B (new Wordpress setup)

The customer wants a new website but doesn't want to pay to move the functionality of the customer area. So what I need to do is have a login menu option which goes to the old server login page.
I am hoping this can be done something like this.

Website B on my hosting with the DNS pointing to my hosting, have a subdomain of login.example.com pointing to the Website A old server where the Htaccess for that server redirects / to /login.
Hardcode all login buttons on Website B to go to the subdomain.

Would that work?
Thanks
 
Permabanned
Joined
9 Aug 2008
Posts
35,707
easy create a subdomain for example oldserver.domain.com (customer area) > point that to old server via an A record.
domain.com create an A record to point to the new server.
Add links for the old portal on the new website to the old server.

The customer portal might need something changing it depends on software though that's been setup. Might be hard coded to accept from certain domains though.
 
Soldato
OP
Joined
18 Oct 2002
Posts
10,123
Would subdomain.domain.com/login be enough to access the login page though, the problem my brain is having is that surely the site_url or home_url for the old site would have to be changed to the same as the subdomain for it to understand the link.
For example i cant just create a subdomain on my dns and point it too the BBC website ip address and expect it to work.
 
Soldato
Joined
28 Oct 2006
Posts
12,456
Location
Sufferlandria
Yes, if you do that you'll have to change the site_url and home_url (or whatever the Laravel equivalents are). You would need to do that anyway though. You can't have 2 websites running on different servers with the same url, you can only point the dns to one of those servers so they need to have different urls.
You'll also need to set up the domain in your hosting and point the subdomain to the old website.
 
Permabanned
Joined
9 Aug 2008
Posts
35,707
Would subdomain.domain.com/login be enough to access the login page though, the problem my brain is having is that surely the site_url or home_url for the old site would have to be changed to the same as the subdomain for it to understand the link.
For example i cant just create a subdomain on my dns and point it too the BBC website ip address and expect it to work.

The server software has to understand what's what as well.
 
Back
Top Bottom