Ok [SOLVED] the routes_in and routes_out problem. Solution below...

However I am having trouble finding the right location for my .htaccess, I
would much prefer using apache mod_rewrite. I have tried using a basic "Deny
from all" .htaccess for testing, I have tried the web2py directory, the app
directory, inside the <virtualhost>(which throws an error). I have
DocumentRoot in the <virtualhost> set to the web2py folder. No simlinks.

# Make controller actions base url. Remove init from appadmin. Allow
admin defaults.
routes_in = (

        ('^/admin(?P<any>.*)', '/admin\g<any>'),
        ('^/appadmin(?P<any>.*)', '/init/appadmin\g<any>'),

        ('^/(?P<any>.*)', '/init/default/\g<any>'),
)


routes_out = (

        ('/init/default/(?P<any>.*)', '/\g<any>'),
        ('/init/appadmin(?P<any>.*)', '/appadmin\g<any>'),

)


-Thadeus




On Mon, Oct 26, 2009 at 12:32 PM, Thadeus Burgess <[email protected]>wrote:

> Also, temporarily.
>
> How would I use routes to rewrite a url except
>
> Normal url
>
> mysite.com/init/default/index
>
> I want
>
> mysite.com/index
>
> But still have accessible.
>
> mysite.com/admin
>
> And
>
> mysite.com/appadmin
>
> This is what I have, however admin still does not work.
>
>
> routes_in = (
>
>         ('/appadmin', '/init/appadmin'),
>         ('/admin', '/admin'),
>
>
>         ('/(?P<any>.*)', '/init/default/\g<any>'),
> )
>
>
>
> routes_out = (
>
>
>         ('/init/default/(?P<any>.*)', '/\g<any>'),
> )
>
>
>
> -Thadeus
>
>
>
>
>
> On Mon, Oct 26, 2009 at 12:04 PM, Thadeus Burgess 
> <[email protected]>wrote:
>
>> When using Apache Virtual Hosts, set up exactly like in the book, where
>> does the .htaccess to rewrite url go?
>>
>> -Thadeus
>>
>>
>>
>

--~--~---------~--~----~------------~-------~--~----~
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