On Sat, Sep 26, 2009 at 10:52 AM, mdipierro <[email protected]> wrote:

>
> You have two options:
>
> 1) rename default.py into great_keyword.py (the controller does not
> need to be called default)
>

that may not be what was asked for - the defailt behavior (or list of
options) is not currently configuratble, e.g. if you're used to (for
example)  IIS, where you can setup the list of default pages (and search
order) for a web app, then you can set things like "index.html,
default.html, ...."

Here - web2py does not have this configurable (correct me if I'm wrong,
Massimo) -

For applications, it is hardwired to:

[1]  init, or if not existing:
[2]  welcome

For controller, it is hardwired to default.  If you do NOT have a default.py
controller AND you do not supply a controller in the path, web2py will TRY
..../appname/default/index - and you will get a "invalid controller" page as
a result (which, actually, is not very nice for end users).


> 2) create a file web2py/routes.py that says
>
> routes_in=(('/myapp/great_keyword/(?P<a>.)','/myapp/default/\g<a>'),)
> routes_out=(('/myapp/default/(?P<a>.)','/myapp/great_keyword/\g<a>'),)
>

I think this is probably not what was asked for - this will take any attempt
to browse (explicitly) to
http://www.mydomain.net/myapp/great_keyword   and redirect it to
myapp/default, as well as show it in the browser as  myapp/great_keyword.


You would need to add mappings for routes_in from '/' to default (or
great_keyword, if that is how your controller is named).

How does this translate / affect search engine optimization?


> On Sep 26, 9:07 am, Web2py-SuperFan <[email protected]> wrote:
> > Thanks for this great tool!  Bought the book too, still digging
> > through.  My question is on Search Engine Optimization.
> >
> > Is there a way to have a different file name besides default.py  be
> > the file name used when hitting a url without a controller in the
> > url?  (without using urlrewrites)
> >
> > ie  I want a call to  http://mysite.com/myapp
> >
> > to result in
> >
> > http://mysite.com/myapp/great_keyword/index.html
> >
> > not
> >
> > http://mysite.com/myapp/default/index.html
> >
> > Thanks
> > Mark
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to