이 URL에서 #을 제거하려면 또한 생산 모드에서 URL에서 #을 제거 나는 app.module.ts이를 퍼트angular2
providers: [
...,
{provide: LocationStrategy, useClass: PathLocationStrategy},
...
로컬 호스트 : 4200/카테고리
로컬 호스트 : 4200/#/카테고리
모든 로컬 호스트에서잘 작동하지만이 명령
ng build --environment=prod --bh=/site/ --aot --no-sourcemap
나는이 :
export const environment = {
production: true,
baseUrlBuilderMask: 'http://site_url/',
baseUrlApi: 'http://site_url/site/api/',
baseUrlAssets: 'http://site_url/site/assets/'
}
나는이 작동하지 않는 경우, 온라인 사이트를보십시오.
나에게 404 오류를 제공합니다. 내가
내 Web.config의에서 ISS
을 사용하고나는 변경해야 할 무엇
<rewrite>
<rules>
<rule name="AngularJS" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
있나요?
'web.config'를 게시 할 수 있습니까? – Dhyey
@Dhyey 내가 @Dhyey 어쩌면 내가 내 webConfig을 분할해야하지만, 지금은 또 다른 문제가 서버 – Martina
에 URL 재 작성을 수행하는 웹 설정 부분을 게시 https://stackoverflow.com/questions/47019087/iis-with-angular2-webapi -joomla – Martina