redirect domains to a principal

Topics: User Forum
Dec 3, 2009 at 11:53 AM

Hi all,
i got 5 domain like "", "", "", etc...

I need a rex epr (I try but seem no run correctly) to redirect all url to one principal like ""

The incoming url is like:

a need a rule for redirection on


I write this one on my .ini files:

RewriteCond %{HTTP_HOST}    ^(.*)\.keyword1-keyword2\.info   [OR]
RewriteCond %{HTTP_HOST}    ^(.*)\.keyword1\.com                  [I]
RewriteRule ^(.*)$         http:/$1                    [L,R=301]

Wrong someting?

Thanks Alen Italy

Dec 3, 2009 at 8:24 PM

Buon giorno Signor Cappalletti,

You cannot use the [R=301] modifier  with the RewriteRule.  You must use it with RedirectRule.  

If you look into the IIRF log file, you will see a warning related to this.  Also with Redirects, you do not need [L].  The redirect is implicitly the last action. 

Also, attach [I] to the initial RewriteCond, like so:  [I,OR]

If you change that, your rules will look like this:

RewriteCond %{HTTP_HOST}    ^(.*)\.keyword1-keyword2\.info     [I,OR]
RewriteCond %{HTTP_HOST}    ^(.*)\.keyword1\.com               [I]
RedirectRule ^(.*)$         http:/$1       [R=301]

With those modifications, I think your rule may work.

Dec 4, 2009 at 8:43 AM

Thak you Cheeso run it!