0

I have school management system, where school owners have is registered. I am giving them a subdomain eg school1.mysite.com.

All is fine till here, but one school's owner wants this to place it on their own domain(school1.com).

I tried to point school1.com to url(school1.mysite.com) and it worked well for homepage, but when I navigated to another page by clicking some link I have been noticed that url is still school1.com actually school1.mysite.com if displayed inside iframe.

Question 1: Is it possible to point a domain to sub-domain of another domain, I away where on navigation pages and query string append with this domain and also always keep this domain in url, not just redirect?

Question 2: If it possible, what are the possible solutions and which is the best?

2 Answers 2

0

This question points to a competency problem on your end - structural. I would review the runbook and SOPs.

I have school management system

That is custom software, I can only assume, because you do not name a product. That you got programmed. Somehow (as in: you obviously are over your head competence wise). The programming did NOT prepare for this scenario, so your programmers must fix it.

I tried to point school1.com to url(school1.mysite.com) and it worked well for homepage, but when I navigated to another page by clicking some link I have been noticed that url is still school1.com actually school1.mysite.com if displayed inside iframe.

Well, given that is your software you should not try it - but test it. In a test environment.

The obvious problem here is that links between pages seem to be hardcoded in some way - relative links (href = "/blabla") will never resovle to a different host name. Non-relative links only MUST be used when changing the domain (switching schools or to an admin site), but can be avoided within a site - which is also saving some bandwidth. Somehow your programming does not use relative URL's, and does not account to the fact that a custom domain shall be used.

Classical failure.

Either from your programmers, or your support (which granted a not-implemented feature to a customer and now has sold a not supported configuration). Would not be the first time I see this ;)

Whatever you do, someone needs to start looking into the code and fix it and make a custom domain a supported scenario.

You COULD use a proxy under the new domain, including http text rewriting (changing all links in the pages), but that is like a very complex hack on top of a broken/not supported configuration.

May I ask why this question even ends up here? This is a classical scenario where I would expect the lead developer to step in. He should be very aware of compromises made and inherent limitations - especially of something as fundamental as domain name handling in the code. Whoever tried to set this up should have realized this is not a normal setup and not covered by their runbook. And as it is not covered and obviously a deviation, it should have resulted in reading documentation and then (as it is not supported there) an escalation. To said lead developer.

-1

You would create a CNAME DNS record on school1.com that maps to school1.domain.com?

All DNS providers let you set CNAME records.

Apologies if you have tried this already.

1
  • DNS naming will not help the page hardcoding a specific domain assumption in the HTM REF tags instead of using relative URL's. From the Question it is quite obvious he already solved the DNS side - otherwise the homepage would not work.
    – TomTom
    Feb 4, 2018 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .