
May 14th, 2000, 11:24 AM
|
|
Junior Member
|
|
Join Date: May 2000
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hi!
I have an apache vserv with the following configuration:
ServerName www.mydomain.com
ServerAlias www.my-domain.com
Since I want www.mydomain.com to be the only used address I thought about rewriting the URL through .htaccess with Apache's Rewriting Engine. It should redirect all requests to www.my-domain.com/whatever_here to www.mydomain.com/whatever_here. I wrote the following code (without any reactions from apache):
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.my-domain.com$
RewriteRule ^/(.*)$ http://www.mydomain.com/$1 [R]
As I said, this showed simply no result. Whenever I call www.my-domain.com in my browser the website opens up without the URL being rewritten.
Anybody knows why?
Thanks,
Matthias
|