Welcome Guest, Not a member yet? Register   Sign In
Redirect url to new domain

(This post was last modified: 10-23-2015, 07:38 AM by Wouter60.)

I discovered that my .htaccess was ignored by the server, because it wasn't ANSI. I changed that, and now it does execute the .htacccess.

Still, there is one issue left.
My .htaccess looks like this:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^domain1\.nl$ [NC]
RewriteRule ^(.*)$ http://www.domain2.nl [R=301,L]

If a visitor enters www.domain1.nl, there's an error. If he enters domain1.nl (without the www), the url is redirected correctly.
If a visitor enters domain1.nl/contact, there's an error. And when he enters www.domain1.nl/contact, the url is redirected.
How can I correct this behaviour? I want all URL's that point to domain1 (with or without www) redirected to domain2.

Messages In This Thread
Redirect url to new domain - by Wouter60 - 10-22-2015, 12:37 PM
RE: Redirect url to new domain - by PaulD - 10-22-2015, 08:04 PM
RE: Redirect url to new domain - by Wouter60 - 10-23-2015, 04:11 AM

Theme © iAndrew 2016 - Forum software by © MyBB