0

Problem Summary:

I have two separate angular projects:

  1. My portfolio website
  2. My personal project named "Agency"

I have successfully deployed these two projects on Netlify.

Then, I set up a custom domain for my portfolio website.

The URL for these projects are as follows:

  1. Portfolio website (www.snsakib.com)
  2. "Agency" website (https://project-agency.netlify.com)

I'm now trying to change the "Agency" website's URL as follows:

"www.snsakib.com/projects/agency/live-demo"

Background & what I've already tried:

Both projects are created with Angular 8.

I've found this question & this question are somewhat close to my problem.

I've successfully implemented the techniques provided by the above questions into a normal HTML,CSS & JS project. But when I try to implement this same technique to an Angular project the browser renders a blank page.

I've created a _redirects file in my portfolio website's repo & added the following rules:

# Redirects rules for showing project live demos
/projects/agency/live-demo https://project-agency.netlify.com 200!

# Redirects rules for single page application
/* /index.html 200

Expected Result:

While visiting "www.snsakib.com/projects/agency/live-demo" link the browser should render the website but it renders a blank white page.

If I visit the Netlify provided URL (https://project-agency.netlify.com) then the website renders properly.

snsakib
  • 1,062
  • 9
  • 14
  • I'm not sure but, the issue could be the redirects on the `https://project-agency.netlify.com/` site. Proxy rewrites and routing is a pain to deal with. Since it is a static demo, I would just make it a subdomain of the main domain with an explanation of the project on the project page `/projects/agency` with a link to the demo `agency-demo.snsakib.com`. This way you still get the rebuilds on the demo and the added marketing page. – talves Sep 18 '19 at 14:01
  • What I understood from your answer that you are proposing me to configure [Branch Subdomains](https://www.netlify.com/docs/custom-domains/#branch-subdomains). Then I've to host all of my projects into a single repo but I'm trying not to do this. Because it's difficult to maintain all of my projects. – snsakib Sep 18 '19 at 14:21
  • I'm not suggesting a branch subdomain, but a new site with the domain as a subdomain and a CNAME entry in DNS pointing to the Netlify site domain (your-new-site.netlify.com) – talves Sep 18 '19 at 20:03
  • Ok. Now I get your proposal. It's a nice workaround indeed! But I still want to implement the specific URL mentioned in the question. – snsakib Sep 19 '19 at 00:38

0 Answers0