Looks like this mod_rewrite works... probably the error was cache...
On Thu, Jan 12, 2012 at 5:36 PM, Tito Garrido <[email protected]> wrote:
> Using mod_rewrite I got:
>
> # to remove www -> httpd.conf
> RewriteEngine On
> RewriteCond %{HTTP_HOST} ^www.mydomain.com$ [NC]
> RewriteRule ^(.*)$ http://mydomain.com.br/ [R=301,L]
>
> It's redirecting to:
> mydomain.com/webapps/web2py27/web2py/wsgihandler.py/
>
> Any clue what am I doing wrong?
>
>
>
>
> On Thu, Jan 12, 2012 at 5:21 PM, Jonathan Lundell <[email protected]>wrote:
>
>> On Jan 12, 2012, at 11:12 AM, Tito Garrido wrote:
>>
>> Hey folks!
>>
>> Is there a way, maybe using routes, to remove www.mydomain.com from the
>> URL?
>>
>>
>> Use apache, or the equivalent, to redirect www accesses to the base
>> domain.
>>
>> But there does seem to be a bug as well.
>>
>>
>> I mean when the user type www.mydomain.com goes to mydomain.com... I'm
>> asking because I'm having problems with facebook authentication... when I
>> try to login from www.mydomain.com it returns:
>>
>> Traceback (most recent call last):
>>
>>
>>
>>
>> File "/home/titogarrido/webapps/web2py27/web2py/gluon/restricted.py", line
>> 204, in restricted
>>
>>
>>
>>
>> exec ccode in environment
>> File
>> "/home/titogarrido/webapps/web2py27/web2py/applications/gt2/controllers/default.py"
>>
>> <https://admin.gametraders.com.br/admin/default/edit/gt2/controllers/default.py>,
>> line 458, in <module>
>>
>>
>>
>>
>> File "/home/titogarrido/webapps/web2py27/web2py/gluon/globals.py", line
>> 172, in <lambda>
>>
>>
>>
>>
>> self._caller = lambda f: f()
>>
>>
>>
>>
>> File
>> "/home/titogarrido/webapps/web2py27/web2py/applications/gt2/controllers/default.py"
>>
>> <https://admin.gametraders.com.br/admin/default/edit/gt2/controllers/default.py>,
>> line 58, in user
>>
>>
>>
>>
>> return dict(form=auth())
>> File "/home/titogarrido/webapps/web2py27/web2py/gluon/tools.py", line
>> 1141, in __call__
>>
>>
>>
>>
>> return getattr(self,args[0])()
>>
>>
>>
>>
>> File "/home/titogarrido/webapps/web2py27/web2py/gluon/tools.py", line
>> 1770, in login
>>
>>
>>
>>
>> redirect(cas.login_url(next))
>>
>>
>>
>>
>> File
>> "/home/titogarrido/webapps/web2py27/web2py/gluon/contrib/login_methods/oauth20_account.py",
>> line 148, in login_url
>>
>>
>>
>>
>> self.__oauth_login(next)
>> File
>> "/home/titogarrido/webapps/web2py27/web2py/gluon/contrib/login_methods/oauth20_account.py",
>> line 204, in __oauth_login
>>
>>
>>
>>
>> self.accessToken()
>> File
>> "/home/titogarrido/webapps/web2py27/web2py/gluon/contrib/login_methods/oauth20_account.py",
>> line 114, in accessToken
>>
>>
>>
>>
>> raise Exception(e.read())
>> Exception: {"error":{"message":"redirect_uri isn't an absolute URI. Check
>> RFC 3986.","type":"OAuthException"}}
>>
>>
>> Using mydomain.com it works...
>>
>> Not sure if it's a problem on my facebook config or oauth20_account.py.
>>
>> Thanks,
>>
>> Tito
>>
>> --
>>
>> Linux User #387870
>> .........____
>> .... _/_õ|__|
>> ..º[ .-.___.-._| . . . .
>> .__( o)__( o).:_______
>>
>>
>>
>>
>
>
> --
>
> Linux User #387870
> .........____
> .... _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:_______
>
--
Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______