I have been asked to change the route on a rail project that the route will only respond to requests where the name of the app (or Other arbitrary string) is the first string after the domain name, e.g.
< Code> www.thething.com/appname instead of I have suggested using a subdomain Is there an easy way to modify the routes so that all the routes An option wraps all existing routes into: I'm not sure that this is the most beautiful solution, but it's all the routes For instead of
www.thething.com/appname/users/sign_in
www.thething com / users / sign_in
www.thething.com
www.thething.com/appname/search Instead of
www.thething.com/search
instead, but the client about the url's willingness in the above format Very specific.
www.thething.com will be a splash page with a link to
www.thething.com/appname , in the future, new folders in the future Intended to add additional apps / pages with names.
namespace: appname ...
Termination , such as:
# config / routes.rb Appname :: Application.routes.draw namespaces: APNM # Existing routes have expired here
/ appname will be done first.
No comments:
Post a Comment