I'm using htaccess to redirect mydomain.com to www.mydomain.com
with this code:
RewriteEngine on
Options +FollowSymlinks
# Redirect non-www to www
rewritecond %{HTTP_HOST} ^mydomain.com$ [nc]
rewriterule ^(.*)$ http://www.mydomain.com/ [r=301,nc]
which works well if you access the index page. but if you enter
mydomain.com/Article?id=10 it redirects you to www.mydomain.com/?id=10
if I change the last htaccess line to rewriterule ^(.*)$
http://www.mydomain.com/$1
[r=301,nc]
I'm redirected to
http://www.mydomain.com/web2py/wsgihandler.py/Article?id=10 which gives me
a 404 error.
Any Ideas how I can fix this. I know its not the ideal place to ask for
htaccess 301 redirects but I bet
somebody here has already done exactly that.
PS: I read that quite a few people asked where you have to put the
.htaccess file one folder above the web2py folder. So if web2py is located
at /home/www-data/web2py/ www-data would be the correct place.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.