I'm experiencing some URL rewrite unexpected behavior and i am sure i am missing something. Hopefully i can convey this good enough.
I have an existing Wordpress site fully updated running NginX and php 8.1 on WHM/Cpanel
The original Sites URL was changed in the modify account area from abc.com to xyz.com. The site resolves and works as intended and Cpanel rewrote all the correct permalinks in the WordPress site. xyz.com is now the primary domain. Success!
I then put abc.com as an addon domain in Cpanel.
I then used the Cpanel redirect interface.
Type 301
abc.com
/
redirects to https://xyz.com
redirect with or without www
Wildcard redirect
Add
If i go to www.abc.com or ABC Home Page - ABC.com it takes me to the site and the URL in the address bar is displayed as xyz.com. Success!
Now if i go to a cached link on google or type in the path directly for a sub page such as https://abc.com/yard-management-101/ the URL in the address bar is not rewritten and still shows the original abc.com.
My expectation would be if I type in https://abc.com/yard-management-101/ it would redirect me to https://xyz.com/yard-management-101/
Can anyone tell me what I am missing here?
I have an existing Wordpress site fully updated running NginX and php 8.1 on WHM/Cpanel
The original Sites URL was changed in the modify account area from abc.com to xyz.com. The site resolves and works as intended and Cpanel rewrote all the correct permalinks in the WordPress site. xyz.com is now the primary domain. Success!
I then put abc.com as an addon domain in Cpanel.
I then used the Cpanel redirect interface.
Type 301
abc.com
/
redirects to https://xyz.com
redirect with or without www
Wildcard redirect
Add
If i go to www.abc.com or ABC Home Page - ABC.com it takes me to the site and the URL in the address bar is displayed as xyz.com. Success!
Now if i go to a cached link on google or type in the path directly for a sub page such as https://abc.com/yard-management-101/ the URL in the address bar is not rewritten and still shows the original abc.com.
My expectation would be if I type in https://abc.com/yard-management-101/ it would redirect me to https://xyz.com/yard-management-101/
Can anyone tell me what I am missing here?