Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 4 years ago.
Improve this questionI am changing the domain of my website.
But, I am struggling with the domain redirection. I need to implement this wildcard redirection.
So that I visit.
It should go to
Note: The new domain is without www.
Can anyone help me how to implement this?
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 4 years ago.
Improve this questionI am changing the domain of my website.
But, I am struggling with the domain redirection. I need to implement this wildcard redirection.
So that I visit.
https://www.oldomain/page1
It should go to
https://newdomain/page1
Note: The new domain is without www.
Can anyone help me how to implement this?
Share Improve this question edited May 21, 2020 at 9:03 fuxia♦ 107k38 gold badges255 silver badges459 bronze badges asked May 21, 2020 at 6:11 Nirmal KUmarNirmal KUmar 11 silver badge2 bronze badges 1 |1 Answer
Reset to default 1RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.oldomain [NC]
RewriteRule ^(.*)$ http://newdomain/$1 [L,R=301]
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742413755a4439333.html
newdomain
currently pointing to the same place aswww.oldomain
? – MrWhite Commented May 21, 2020 at 9:04