Domain 301 Redirection

ialmahmud

Newbie
Joined
Oct 9, 2015
Messages
26
Reaction score
0
I am facing a problem while I redirect (301) a domain.

The problem is When I visit the domain ( domainname1.com) it redirects perfectly to the new domain.

but when I visit using https://www.domainname1.com or http://www.domainname1.com it's not redirecting to my new domain.\

Can anyone please help me to fix this.
 
It sounds like your 301 redirect is not set up properly to redirect all versions of your domain, including the versions with the "www" subdomain and the HTTPS protocol. To fix this, you can update your domain's DNS settings to point all versions of your domain to the same IP address.
 
Few things first:

- This particular issue has been covered online probably a million times
- It has been covered on this forum at least a few dozen times
- If you want help with code, it would be a good idea to post it here

Response: Because your code is crap. Put this into your htaccess file.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domainyouwanttoredirect.com$ [OR]
RewriteRule ^(.*)$ urlwhereyouwanttheredirecttopoint.com$1 [R=301,L]
 
How did you redirect?
I had the same issue when redirecting through the registrar. Their redirect did not work properly.
 
How did you redirect?
I had the same issue when redirecting through the registrar. Their redirect did not work properly.
The main problem is from OVH cloud I guess. I was trying to redirect from the registrar and htaccess also.
 
Back
Top