Forum Moderators: phranque
example.com
user.provider.org
web.provider.org/~user
all have to end up on (query strings must be taken along):
http://www.example.com/
With the first two I haven't got a single problem doing:
RewriteCond %{HTTP_HOST} ^example\.com回user\.provider\.org回web\.provider\.org
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
It's with the third that something odd happens. When I enter 'web.provider.org/~user' in my address bar, it switches to www.example.com//home/user/www. If I enter any other address (eg. http://web.provider.org/~user/), it works fine... So when a '/' follows ~user, there is no problem at all.
I tried rewriting the RewriteCond like this:
RewriteCond %{HTTP_HOST} ^example\.be回user\.provider\.org回web\.provider\.org/~user
but then it fails on all addresses based upon web.provider.org/~user.
I've been searching and searching...
Many thanks in advance!
[edited by: jdMorgan at 2:20 pm (utc) on Sep. 15, 2005]
[edit reason] Example.com [/edit]
RewriteCond %{HTTP_HOST} ^example\.com回user\.provider\.org
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^web\.provider\.org
RewriteCond %{REQUEST_URI} ^/~user
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
web.provider.org/~user turns into www.example.com//home/user/www
web.provider.org/~user/(...) works perfect
Probably I'm missing some of the basics, but I can't figure out what...
[edited by: jdMorgan at 2:22 pm (utc) on Sep. 15, 2005]
[edit reason] Example.com [/edit]