{"id":141,"date":"2018-11-28T21:03:42","date_gmt":"2018-11-28T21:03:42","guid":{"rendered":"https:\/\/unsrewiki.1sys1.com\/?p=141"},"modified":"2018-12-31T18:13:54","modified_gmt":"2018-12-31T18:13:54","slug":"quick-guide-for-htaccess-redirects","status":"publish","type":"post","link":"https:\/\/server-help.org\/index.php\/2018\/11\/28\/quick-guide-for-htaccess-redirects\/","title":{"rendered":"Quick guide for .htaccess redirects"},"content":{"rendered":"\n<p>Redirect HTTPS traffic to HTTP:<\/p>\n\n\n\n<p>RewriteEngine On<br>\nRewriteCond %{HTTPS} on<br>\nRewriteRule (.*) http:\/\/%{HTTP_HOST}%{REQUEST_URI} [R=301,L]<br><\/p>\n\n\n\n<p>Redirect HTTP traffic to HTTPS:<\/p>\n\n\n\n<p>RewriteEngine On<br>RewriteCond %{HTTPS} off<br>RewriteRule (.*) https:\/\/%{HTTP_HOST}%{REQUEST_URI} [R,L]<\/p>\n\n\n\n<p>Redirect both HTTPS and HTTP to HTTPS without www:<\/p>\n\n\n\n<p>RewriteCond %{HTTPS} off [OR]<br>\nRewriteCond %{HTTP_HOST} ^www. [NC]<br>\nRewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC]<br>\nRewriteRule ^(.*)$ https:\/\/google.com\/$1 [R=301,L]<\/p>\n\n\n\n<p>Redirect both HTTPS and HTTP to HTTPS with www:<\/p>\n\n\n\n<p>RewriteEngine On<br>\nRewriteCond %{HTTPS} off [OR]<br>\nRewriteCond %{HTTP_HOST} !^www. [NC]<br>\nRewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC]<br>\nRewriteRule ^(.*)$ https:\/\/www.google.com\/$1 [R=301,L]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Redirect HTTPS traffic to HTTP: RewriteEngine On RewriteCond %{HTTPS} on RewriteRule (.*) http:\/\/%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Redirect HTTP traffic to HTTPS: RewriteEngine OnRewriteCond %{HTTPS} offRewriteRule (.*) https:\/\/%{HTTP_HOST}%{REQUEST_URI} [R,L] Redirect both HTTPS and HTTP to HTTPS without www: RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www. [NC] RewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC] RewriteRule ^(.*)$ https:\/\/google.com\/$1 [R=301,L] Redirect both HTTPS and&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"_links":{"self":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/141"}],"collection":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/comments?post=141"}],"version-history":[{"count":1,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/141\/revisions"}],"predecessor-version":[{"id":142,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/posts\/141\/revisions\/142"}],"wp:attachment":[{"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/media?parent=141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/categories?post=141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server-help.org\/index.php\/wp-json\/wp\/v2\/tags?post=141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}