I want to redirect http://example.com to coming-soon.html template, but not index.html.
Possible to do it in route settings?
I want to redirect http://example.com to coming-soon.html template, but not index.html.
Possible to do it in route settings?
If you are trying to cover the site from the public while working on it live, i personally would name my coming soon template file 503.html
Then in the General Settings section of the control panel, switch System Status off.
That way so long as you are logged in, you can access the site as normal but anyone else visiting your site will see the contents of the 503.html
template.
include
the coming-soon.html and later switch to a proper 503.
You can use the redirect
tag. Put this in your index.html
template:
{% redirect "coming-soon" %}
EDIT
If you want to stay on the homepage but want to show the template code for another page, you can use Twig include. Put this in your index.html
template:
{% include "coming-soon" %}
Alternatively, just put your Coming Soon template code straight onto index.html
? Either way, this answer should cover everything you need.