301 Redirect
I am trying to redirect addon domain to a page of primary domain
I am trying to redirect
I tried via cpanel redirects but it is not working.
This is code in .htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.ca$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain\.ca$
RewriteRule ^/?$ "https\:\/\/domain\.com\/services\/byedettes\/" [R=301,L]
-
While I did change the name of the domain to reference an example domain, prior to that I ran the following and don't see an issue with the redirection: # curl -vv http://www.domain.ca/ * About to connect() to www.domain.ca port 80 (#0) * Trying 199.16.128.67... * Connected to www.domain.ca () port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: www.domain.ca > Accept: */* > < HTTP/1.1 301 Moved Permanently < Connection: Keep-Alive < Content-Type: text/html < Content-Length: 706 < Date: Tue, 20 Oct 2020 13:49:51 GMT < Server: LiteSpeed < Location: https://quebecprets.com/services/byedettes/
I'd wager that you weren't seeing the redirect due to caching but it is indeed there and functioning0 -
quick question, why not do this at the DNS level? 0
Please sign in to leave a comment.
Comments
2 comments