[erlang-questions] Nitrogen start page
Sat Mar 17 12:16:51 CET 2012
Aside from my usual recommendation of "have the proxy deal with it",
the solution would be to roll your own route handler.
I'd say copy the current default route handler from nitrogen to a new
module and modify the results of the route("/") call:
to be something like:
You can install this new handler module in your src dir, and then to
make sure nitrogen loads the handler, modify your
%% Obviously use whatever you name your module
%% instead of my_custom_route_handler
Does that make any sense at all or is the late night/early morning
distorting my thoughts?
On Sat, Mar 17, 2012 at 4:31 AM, John Hughes <> wrote:
> I'm using nitrogen on inets to serve a mostly-static web site, with a little
> dynamic content here and there. In particular, the first page is
> static--index.html as usual. But when I just browse to the domain name,
> nitrogen uses index.beam to serve the request--and if there is no
> index.beam, then the request fails.
> I've hacked around this by providing an index.beam that uses wf:redirect to
> go to index.html, which is then served statically. But this means that the
> browser sees a brief "Redirecting..." message... and perhaps risks Google
> thinking that's what the page contains! Is there a way to configure nitrogen
> so that it uses index.html as the start page directly?
> erlang-questions mailing list
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm
More information about the erlang-questions