Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

467
Views
How to run angular application running on single instance from different domains

I have deployed the angular application which is running fine in production with url

http://example.com/my-project

Now we have requirement where we want to run this application from different domain with extra subdomain like

http://exa1.com/**abc**/my-project

When we run the application from dns http://exa1.com/my-project, application runs fine.

But when we are including additional sub domain like abc in between dns and project name then scripts does not loads and start giving 404 not found error.

I tried appending this additional sub domain in base href in index.html like

<base href="/abc/">

Also I have tried

 <script type="text/javascript">
   
   var url = location.href; 
   
    let str=url;
    str=str.substring(0,str.indexOf("my-project"))+'/my-project';
    
    
    var base = document.createElement('base');

    base.href = str;
    document.getElementsByTagName('head')[0].appendChild(base);

    </script>

<base href="/">

But did not succeed.

Kindly guide me further to solve this.

enter image description here

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!