Quickly 301 Redirect WordPress page to another page htaccess
Paste below code to 301 Redirect WordPress page to another page htaccess via .htaccess
Redirect 301 /oldfile.htm /newfile.htm
Quickly Redirect one specific file to another domain such as example.com/oldfile.htm to example.net/newfile.htm:
Paste below code to Redirect one specific file to another domain via .htaccess
Redirect 301 /oldfile.htm https://example.net/newfile.htm
Quickly Redirect an old domain to a new domain such as example.com, and now you decided you actually want to use example.net :
Paste below code to Redirect an old domain to a new domain via .htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ https://example.net/$1 [L,R=301,NC]
Quickly WordPress htaccess Redirect www to non www
Paste below code to WordPress htaccess redirect www to non www
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ https://example.com/$1 [L,R=301,NC]
Quickly 301 redirect all pages with a specific extension
Paste below code to 301 redirect all pages with a specific extension
RewriteEngine On
RewriteCond %{REQUEST_URI} .php$
RewriteRule ^(.*).php$ /$1.htm [R=301,L]