LoginSignup
0
0

More than 1 year has passed since last update.

Angular - How to Add Base URL?

Last updated at Posted at 2021-10-14

If you want to setup the website URL like this https://example.com/aaa/bbb, you will get the resources not found problem. For this reason, we need to add base url prefix in Angular project.

Solution

package.json

// Add this --deploy-url /aaa/bbb/
// Add this --base-href /aaa/bbb/

... skip

ng build --optimization --build-optimizer --configuration production --deploy-url /aaa/bbb/ --base-href /aaa/bbb/

... skip

In your web service(IIS, NGINX, APACHE...etc) server, don't forget opened RW module.

Reference

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0