Here's the code:
RewriteOptions inherit
RewriteCond %{HTTP_HOST} ^old\.olddomain\.example$ [NC]
RewriteRule ^ https://newdomain.example%{REQUEST_URI} [R=301,L]
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
Tested it and it works fine on Windows 10 (laptop) and Iphone, but not Windows 8. Weird.
Browsers: Google Chrome version 84.0.4147.125 (Official Build) (64-bit), Firefox Version version 79.0 (64-bit).
Server Version: Apache/2.4.46 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4, Server MPM: prefork, Server Built: Aug 11 2020 21:16:32
Host says mod_rewrite is on
It doesn't redirect at all, it stays on the original domain if you click throughout the site.
Already flushed DNS and cleared browser caches
Now I'm noticing it isn't updating my latest Wordpress post. This is the weirdest thing because it's only happening on one of my devices but all of its browsers (desktop with Windows 8.1).
Only recent changes on site: upgraded to PHP 7.4 for old domain and new domain. New host migrated site from old host. Have since cancelled with new host. They said they didn't make any changes to 301 Redirects.
Latest update: now it's timing out on Windows 8.1, but it's working fine on everything else...
.htaccess
file? "RewriteOptions inherit
" - what directives are you inheriting? – MrWhite Aug 17 '20 at 7:55