What's the preferred way to clean up the URLs? For example, I never
want "/myapp/default/index" to display.



/myapp is OK during development and/or when I'm on a server with
multiple apps. But when I'm on a domain/server with one app, I
want "http://myserver.com/"; to go to my home page without showing the
path.


Then, I think what I want is: if there are 0 segments, it routes
to /myapp/default/index. If one segment, it routes
to /myapp/default/segment1. If 2 segments, /myapp/segment1/segment2.
And also handle where the last segment is an ID.


/index should never display and simply be implied by "/".


Would I need routes for all of this? I know I can set myapp to "init"
or "welcome" (or change the default app name) but that leads to the
whole path showing.

Reply via email to