Quickly 301 Redirect WordPress page to another page htaccess

//Quickly 301 Redirect WordPress page to another page htaccess

Quickly 301 Redirect WordPress page to another page htaccess

Share us

Quickly 301 Redirect WordPress page to another page htaccess

single-file-301-redirect

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:

single-file-domain-301-redirect
Paste below code to Redirect one specific file to another domain via .htaccess

Redirect 301 /oldfile.htm http://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 :

full-domain-301-redirect

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 ^(.*)$ http://example.net/$1 [L,R=301,NC]

 

Quickly WordPress htaccess Redirect www to non www

force-non-www-301-redirect

Paste below code to WordPress htaccess redirect www to non www

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301,NC]

Quickly 301 redirect all pages with a specific extension

file-extension-301-redirect

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]

By | 2018-01-30T07:32:09+00:00 November 20th, 2017|Blog|0 Comments

About the Author:

Leave A Comment