Searched a lot on Google and I haven't found the answer, so apologies if this has been asked.
I am changing the domain for a web server (WP/OpenLiteSpeed/Ubuntu).
Currently the website is fully accessible through either domain — SSL works. All content is served from my URL, let's call it myurl.com.
It's still accessible from the old URL, let's call it oldurl.com. All content (images etc.) is on myurl.com.
How and where do I write a rewrite/redirect rule so that any page loaded on oldurl.com is displayed as myurl.com in the bar? And so Google knows it's a 301 redirect?
I've tried redirect 301 "/" "myurl.com/" in the .htaccess file (at the bottom) but it seemed to have no effect.
If I have to put rewrites into the OLS admin panel, can someone guide me on the syntax please?
Thanks!
I am changing the domain for a web server (WP/OpenLiteSpeed/Ubuntu).
Currently the website is fully accessible through either domain — SSL works. All content is served from my URL, let's call it myurl.com.
It's still accessible from the old URL, let's call it oldurl.com. All content (images etc.) is on myurl.com.
How and where do I write a rewrite/redirect rule so that any page loaded on oldurl.com is displayed as myurl.com in the bar? And so Google knows it's a 301 redirect?
I've tried redirect 301 "/" "myurl.com/" in the .htaccess file (at the bottom) but it seemed to have no effect.
If I have to put rewrites into the OLS admin panel, can someone guide me on the syntax please?
Thanks!