Knowledgebase
Experts needed in a very complicate "redirect" situation...without www!
Posted by nuvolona, 01-28-2011, 09:42 AM | Hello all!
I have tried to find a solution by myself but I spent the whole morning testing .htaccess codes and no one worked
I try to explain my problem,
I own an Italian Geographic domain, which is like, more or less, a 3rd level domain name, let's take as example the domain name: ABCD.ROME.IT
Now the problem is that I want to redirect every user who type in browser "www.abcd.rome.it" or just "abcd.rome.it" (without www)
to another site, a dot com, let's take for example CDEF.COM
Now I have tried this code in .htaccess:
I have tested many other codes but I can't get the redirect to work with the domain written without www...
in few words if i type just "abcd.rome.it" internet cannot find anything... while www.abcd.rome.it is redirected correctly to cdef.com ...
Please help me!
thanks
Last edited by nuvolona; 01-28-2011 at 09:47 AM.
|
Posted by foobic, 01-28-2011, 10:09 AM | The bang (!) reverses the matching - ie. your rule is looking for domain names that don't match. You should be looking for domains that do. Try this:
Note though that the above will match anythingelse.abcd.rome.it as well - if that's a problem it can be made more specific.
|
|
Add to Favourites
Print this Article |
Also Read