Alias /home /var/web/home
Alias /about /var/web/about
Redirect permanent /foo/ http://www.ex.com/bar/
<servlet>
<servlet-name>example</servlet-name>
<servlet-class>com.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>example</servlet-name>
<url-pattern>/example/*</url-pattern>
</servlet-mapping>
phonecatApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/phones', {
templateUrl: 'partials/phone-list.html',
controller: 'PhoneListCtrl'
}).
when('/phones/:phoneId', {
templateUrl: 'partials/phone-detail.html',
controller: 'PhoneDetailCtrl'
}).
otherwise({
redirectTo: '/phones'
});
}]);
<Router history={createHistory()}>
<Route path="/example" component={Application}>
<IndexRoute component={HomePage} />
<Route path="blog" component={BlogPage}/>
<Route path="about" component={AboutPage}/>
</Route>
</Router>
const routes = {
path: '/',
component: App,
childRoutes: [{
path: 'about',
component: About
}, {
path: 'inbox',
component: Inbox
}]
}
/app ➔ Load 'Application' view
/app ➔ HomePage
/app/blog ➔ BlogPage
/app/about ➔ AboutPage
* (not defined) ➔ Page404
/app/blog/123 ➔ BlogPage
/app/about/popcorn ➔ PopcornPage
/app/about/football ➔ FootballPage
/app/about/soccer ➔ SoccerPage
/app/about/football ➔ SoccerPage