I found the solution:

I put the ".htaccess" file in the "/home/www-data" directory and then
I remove the "/$1" in the URL link inside the command... here is the
command inside the ".htaccess" file.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mywebsite.com
RewriteRule (.*) http://www.mywebsite.com [R=301,L]

Cheers,
Yannick P.

On Aug 11, 12:08 pm, Yannick <ytchatch...@gmail.com> wrote:
> hi mate,
> I put the .htaccess file in "/home/www-data/" directory in the same
> directory as web2py dir. Now it seems to work. When i type the URL the
> WWW is added in front of it like i wanted BUT the new issue is the
> following:
>
> when i type mywebsite.com it gets redirect 
> towww.mywebsite.com/web2py/wsgihandler.py/
>
> I wonder and don't understand why it goes to "/web2py/
> wsgihandler.py/" ??
>
> Please help it you know
> Yannick P.

Reply via email to