Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using baseUrl affects the path to my assets

I'm integrating an ember-cli app inside my main site which will be accessible at url http://host/faq/....ember...routes

So I added baseUrl: /faq/ to my ember

config/environment.js

module.exports = function(environment) {
  var ENV = {
    modulePrefix: 'faq',
    environment: environment,
    baseURL: '/faq/',
    locationType: 'hash',

The problem: While developing in my ember-cli environment with ember server my assets such as (SVG, FONTS and IMAGES) are giving me a NOT FOUND now.

For example: http://host/assets/images/bg.png gives me a not found it now expects http://host/faq/assets/images/bg.png. Why is this happening?

like image 665
user391986 Avatar asked Mar 18 '23 00:03

user391986


1 Answers

If you want to serve assets from the root, leave base url as: baseURL: '/'.

Then, to customize the urls for your ember app, configure rootURL on the Router instance (app/router.js): rootURL: '/faq/'

http://emberjs.com/guides/routing/#toc_specifying-a-root-url

like image 122
gdub Avatar answered Mar 24 '23 17:03

gdub