Ok I have spent way to long on this, I can't get any configuration of
routes/mod_rewrite to rewrite the hostname.


-Thadeus





On Tue, Feb 16, 2010 at 10:51 PM, mdipierro <[email protected]> wrote:
> No you just need routes in to rewrite the hostname. Routesout just
> need to delete dashboard from path.
>
> On Feb 16, 5:37 pm, Thadeus Burgess <[email protected]> wrote:
>> I can't find any apache rewrite rules that work in this manner.
>>
>> Basically i am just trying to get
>>
>> dashboard.example.com to internally rewrite web2py's URL scheme so
>> that it looks at /init/dashboard but the user is still staring at
>> dashboard.example.com in their browser. This means web2py routes_out
>> will have to rewrite to the domain schema as well.
>>
>> it is not looking like I can accomplish this with routes or mod_rewrite.
>>
>> Massimo you have said you can redirect to two different apps depending
>> on http_host, isn't this a similar situation?
>>
>> By the way.
>>
>> routes_in containing
>>
>> ('.*:https://dashboard.example.com:GET/(?<any>.*)', 
>> '/init/dashboard/\g<any>'),
>>
>> produces
>>
>> Traceback (most recent call last):
>> [Tue Feb 16 16:14:58 2010] [error] [client   File
>> "/home/servant/sites/themediapanel.com/public/web2py/wsgihandler.py",
>> line 24, in <module>
>> [Tue Feb 16 16:14:58 2010] [error] [client      import gluon.main
>> [Tue Feb 16 16:14:58 2010] [error] [client ]   File "gluon/main.py",
>> line 105, in <module>
>> [Tue Feb 16 16:14:58 2010] [error] [client ]     rewrite.load()
>> [Tue Feb 16 16:14:58 2010] [error] [client]   File "gluon/rewrite.py",
>> line 65, in load
>> [Tue Feb 16 16:14:58 2010] [error] [client
>> params.routes_in.append((re.compile(k, re.DOTALL), v))
>> [Tue Feb 16 16:14:58 2010] [error] [client]   File
>> "/usr/lib/python2.6/re.py", line 190, in compile
>> [Tue Feb 16 16:14:58 2010] [error] [client ]     return _compile(pattern, 
>> flags)
>> [Tue Feb 16 16:14:58 2010] [error] [client ]   File
>> "/usr/lib/python2.6/re.py", line 245, in _compile
>> [Tue Feb 16 16:14:58 2010] [error] [client ]     raise error, v #
>> invalid expression
>> [Tue Feb 16 16:14:58 2010] [error] [client] error: syntax error
>>
>> -Thadeus
>>
>> On Tue, Feb 16, 2010 at 5:06 PM, Thadeus Burgess <[email protected]> 
>> wrote:
>> > Can I do it for just one $c then, that is all I need. Every other
>> > controller will continue to function normally, this is only a special
>> > case controller.
>>
>> > -Thadeus
>>
>> > On Tue, Feb 16, 2010 at 4:35 PM, mdipierro <[email protected]> wrote:
>> >> This cannot be done with routes (at least not unless you list all
>> >> options for c).
>> >> You can do this with mod-rewrite in apache.
>>
>> >> On Feb 16, 4:06 pm, Thadeus Burgess <[email protected]> wrote:
>> >>> No.
>>
>> >>> example.com/$c/$f
>>
>> >>> maps to
>>
>> >>> /init/public/$c/$f
>>
>> >>> and then
>>
>> >>> dashboard.example.com/$f
>>
>> >>> maps to
>>
>> >>> /init/dashboard/$f
>>
>> >>> I basically want
>>
>> >>> $c.example.com/$f
>>
>> >>> /init/$c/$f
>>
>> >>> As I say this I kind of remember a post about this, search failing me.
>>
>> >>> -Thadeus
>>
>> >>> On Tue, Feb 16, 2010 at 4:02 PM, Wes James <[email protected]> wrote:
>> >>> > forgot right bracket ]....
>>
>> >>> > On Tue, Feb 16, 2010 at 2:59 PM, Wes James <[email protected]> wrote:
>> >>> >> On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess 
>> >>> >> <[email protected]> wrote:
>> >>> >>> I need to take the following with routes
>>
>> >>> >>> controller.website.com/action/args
>>
>> >>> >>> and convert it to
>>
>> >>> >>> /init/controller/action/args
>>
>> >>> >>> How can I do this, I have attempted to copy the book example however
>> >>> >>> it is just giving syntax errors.
>>
>> >>> >> This is a guess based on an example I saw:
>>
>> >>> >> routes_in=[('/init/controller/action/args','/action/args')
>>
>> >>> >> -wes
>>
>> >>> > --
>> >>> > 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 
>> >>> > athttp://groups.google.com/group/web2py?hl=en.
>>
>> >> --
>> >> 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 
>> >> athttp://groups.google.com/group/web2py?hl=en.
>
> --
> 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.
>
>

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