apache - htaccess wildcard redirect not working -


I have an htaccess wildcard redirect on a website, it redirects another domain to a main page and from www Redirects to any www. Wildcard for the main domain The following rules are made with cpanel, although it does not use wildcards.

These same rules work well on many other sites, not just in one question.

  RewriteCond% {HTTP_HOST} ^ www \ .domain 1 .ca $ RewriteRule ^ (. *) $ "Http \: \ / \ domain1 \ .ca \ / $ 1" [ R = 301, L] rewrite% {HTTP_HOST} ^ domain2 \. Com [$] [or] rewrite angle% {HTTP_HOST} ^ www \ .domain 2 .com $ RewriteRule ^ (. *) $ "Http \: \ / \ domain1 \ .ca \ / $ 1" [R = 301 , L]  

Any ideas? I am out of ideas due to this.

To add more explanation: If I go to www.domain1.ca/some-page then call it Domain1.ca/some-page However instead it goes to domain1.ca .

Checked in each browser, the rules were rebuilt, all caches removed and multisited DNS flush, nothing has changed. You can use:

{HTTP_HOST} ^ www \. (. +) $ [NC] rewritele ^ http: //% 1% {REQUEST_URI} [R = 301, L, NE] rewrite% {HTTP_HOST} ^ (www \.)? Domain2 \ .com $ [NC] revised rule ^ http: //domain1.ca% {REQUEST_URI} [R = 301, L, Northeast]


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -