Parent Directory | Revision Log
apache: add option to select default redirect URL Add an option to change the URL to redirect to in case of unknown vhost. If the option is not provided, a 404 error is returned.
1 | boklm | 207 | <VirtualHost *:80> |
2 | DocumentRoot /var/www/html | ||
3 | <Location /> | ||
4 | Allow from all | ||
5 | </Location> | ||
6 | boklm | 3184 | <%- |
7 | default_redirect = scope.lookupvar('apache::var::default_vhost_redirect') | ||
8 | if default_redirect == '' | ||
9 | -%> | ||
10 | Redirect 404 / | ||
11 | ErrorDocument 404 "Page Not Found" | ||
12 | <%- else -%> | ||
13 | Redirect / <%= default_redirect %> | ||
14 | <%- end -%> | ||
15 | boklm | 207 | </VirtualHost> |
ViewVC Help | |
Powered by ViewVC 1.1.30 |