I have used gulp to build my client angularJS application. After i deployed into IIS i'm getting an issue. My page is working fine when navigate through menu's. But when i refresh by page (or) copy and paste the URL its giving me 404 error. HTTP Error 404.0 - Not Found can anyone help me, to resolved this?
Asked
Active
Viewed 599 times
1 Answers
0
Use the
otherwise
method, which is the default route when none of the others get a match
Did you configured otherwise
option in your route config section?
like this below?
app.config(function($routeProvider) {
$routeProvider.otherwise({
templateUrl : "main.htm",
controller : "mainController"
});
});
You can test it under this link
https://www.w3schools.com/angular/tryit.asp?filename=try_ng_routing_otherwise
I hope you can solve your issue by this below discussion

Community
- 1
- 1

Ramesh Rajendran
- 37,412
- 45
- 153
- 234
-
i don't have any issue navigation through menu, meaning i have a route. also i have configured otherwise route as well. – Velkumar Mar 08 '17 at 08:54
-
@Velkumar did you try `$locationProvider.html5Mode(false);` ? in your route config – Ramesh Rajendran Mar 08 '17 at 09:01
-
yes now its working fine. Thank you But do you know how to remove # from URL? – Velkumar Mar 08 '17 at 09:17