I'm trying to get map.root to point to a static html file in the public
directory. I can't just have index.html since I'm doing subdomains and
any index.html file in there will be used as the actual page displayed.
Basically I can point to my subdomain roots just fine, but I need to
find a way to point map.root to a specific html file. For example,
something like this: map.root :url => 'homepage.html'
That example doesn't work obviously.
Any input would be greatly appreciated. If you need any more info,
please let me know! Thanks.
I'm trying to get map.root to point to a static html file in the public
directory. I can't just have index.html since I'm doing subdomains and
any index.html file in there will be used as the actual page displayed.
Sorry, missing something here --
What's the difference between using static file "index.html" and static
file "homepage.html"?
Rails automatically picks up 'index.html' as the root page for the site.
Whether it's a subdomain (ex. user.app.com) or the actual domain
(app.com), if the 'index.html' is present then it is picked up as the
root.
What I want is to have my subdomain root (ex. user.app.com) to point to
the user login page (which I currently have working) and the domain root
(ex. app.com) to have a typical welcome/signup index page. This index
page is going to be 100% static so I'd prefer to just have it as a file
(say homepage.html) in the public directory. I realize I could get this
working by creating a 'page' controller and view and then direct
map.root to that specific controller/view but I think cutting down on
unnecessary rails calls would be best.
In short, the standard way of providing the root page of a web site is
to
use an index.[php|html|htm|...] but feel free to use one
of the methods above to achieve your result.