{"id":963,"date":"2014-12-31T22:56:25","date_gmt":"2014-12-31T22:56:25","guid":{"rendered":"http:\/\/elbsolutions.com\/projects\/?p=963"},"modified":"2022-02-03T11:24:59","modified_gmt":"2022-02-03T17:24:59","slug":"htaccess-ever-wanted-know","status":"publish","type":"post","link":"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/","title":{"rendered":".htaccess &#8211; all you ever wanted to know"},"content":{"rendered":"<p>For me, this has always been frustrating because I use it only once every 8-12 months. Here are some great links to get refreshed.<\/p>\n<p>Basically, what I was trying to do was get all traffic https going to my customers&#8217; mywebsite.com\/payments page and all other traffic without &#8220;\/payments&#8221; in the name to mymainwebsite.com. It is important to note, that the myshorturl.ca site is the one with the https or SSL on it. Here are the links I used<\/p>\n<ul>\n<li class=\"p1\"><a href=\"http:\/\/httpd.apache.org\/docs\/current\/mod\/mod_rewrite.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/httpd.apache.org\/docs\/current\/mod\/mod_rewrite.html<\/a><\/li>\n<li class=\"p1\"><a href=\"http:\/\/www.askapache.com\/htaccess\/http-https-rewriterule-redirect.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.askapache.com\/htaccess\/http-https-rewriterule-redirect.html<\/a><\/li>\n<li class=\"p1\"><a href=\"http:\/\/serverfault.com\/questions\/214512\/redirect-change-urls-or-redirect-http-to-https-in-apache-everything-you-ever\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/serverfault.com\/questions\/214512\/redirect-change-urls-or-redirect-http-to-https-in-apache-everything-you-ever<\/a><\/li>\n<\/ul>\n<p>The eventual code form my .htaccess file was<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\r\n#RewriteCond {HTTPS} on\r\n#RewriteRule ^(.*)$ https:\/\/www.myshorturl.ca\/payments\/$1\r\n\r\n#RewriteCond %{HTTPS} on\r\n#RewriteRule .* https:\/\/www.myshorturl.ca\/payments &#x5B;R,L]\r\n\r\nRewriteCond %{REQUEST_URI} \/tithe &#x5B;NC]\r\nRewriteRule ^(.*)$ https:\/\/www.myshorturl.ca\/payments\/ &#x5B;L,R=301]\r\n\r\nRewriteCond %{HTTPS} off\r\nRewriteCond %{REQUEST_URI} \/payments &#x5B;NC]\r\nRewriteRule ^(.*)$ https:\/\/www.mycumbersomeurl.ca\/payments\/$1 &#x5B;L,R=301]\r\nRewriteCond %{HTTPS} off\r\nRewriteCond %{HTTP_HOST} !^www.mycumbersomeurl.com$ &#x5B;NC]\r\nRewriteRule ^(.*)$ http:\/\/www.mycumbersomeurl.com\/$1 &#x5B;L,R=301]\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>For me, this has always been frustrating because I use it only once every 8-12 months. Here are some great links to get refreshed. Basically, what I was trying to do was get all traffic https going to my customers&#8217; mywebsite.com\/payments page and all other traffic without &#8220;\/payments&#8221; in the name to mymainwebsite.com. It is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-963","post","type-post","status-publish","format-standard","hentry","category-general"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>.htaccess - all you ever wanted to know - ELB Solutions.com Inc.<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\".htaccess - all you ever wanted to know - ELB Solutions.com Inc.\" \/>\n<meta property=\"og:description\" content=\"For me, this has always been frustrating because I use it only once every 8-12 months. Here are some great links to get refreshed. Basically, what I was trying to do was get all traffic https going to my customers&#8217; mywebsite.com\/payments page and all other traffic without &#8220;\/payments&#8221; in the name to mymainwebsite.com. It is [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/\" \/>\n<meta property=\"og:site_name\" content=\"ELB Solutions.com Inc.\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-31T22:56:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-03T17:24:59+00:00\" \/>\n<meta name=\"author\" content=\"Etienne Bley\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Etienne Bley\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/htaccess-ever-wanted-know\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/htaccess-ever-wanted-know\\\/\"},\"author\":{\"name\":\"Etienne Bley\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\"},\"headline\":\".htaccess &#8211; all you ever wanted to know\",\"datePublished\":\"2014-12-31T22:56:25+00:00\",\"dateModified\":\"2022-02-03T17:24:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/htaccess-ever-wanted-know\\\/\"},\"wordCount\":188,\"articleSection\":[\"General\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/htaccess-ever-wanted-know\\\/\",\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/htaccess-ever-wanted-know\\\/\",\"name\":\".htaccess - all you ever wanted to know - ELB Solutions.com Inc.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#website\"},\"datePublished\":\"2014-12-31T22:56:25+00:00\",\"dateModified\":\"2022-02-03T17:24:59+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/htaccess-ever-wanted-know\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/htaccess-ever-wanted-know\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/htaccess-ever-wanted-know\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\".htaccess &#8211; all you ever wanted to know\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#website\",\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/\",\"name\":\"ELB Solutions.com Inc.\",\"description\":\"Bringing all your IT Pieces together\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/#\\\/schema\\\/person\\\/51e717c68f4f5917c63baf88f0896c39\",\"name\":\"Etienne Bley\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g\",\"caption\":\"Etienne Bley\"},\"url\":\"https:\\\/\\\/elbsolutions.com\\\/projects\\\/author\\\/etienne-bley\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":".htaccess - all you ever wanted to know - ELB Solutions.com Inc.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/","og_locale":"en_US","og_type":"article","og_title":".htaccess - all you ever wanted to know - ELB Solutions.com Inc.","og_description":"For me, this has always been frustrating because I use it only once every 8-12 months. Here are some great links to get refreshed. Basically, what I was trying to do was get all traffic https going to my customers&#8217; mywebsite.com\/payments page and all other traffic without &#8220;\/payments&#8221; in the name to mymainwebsite.com. It is [&hellip;]","og_url":"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/","og_site_name":"ELB Solutions.com Inc.","article_published_time":"2014-12-31T22:56:25+00:00","article_modified_time":"2022-02-03T17:24:59+00:00","author":"Etienne Bley","twitter_misc":{"Written by":"Etienne Bley","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/#article","isPartOf":{"@id":"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/"},"author":{"name":"Etienne Bley","@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39"},"headline":".htaccess &#8211; all you ever wanted to know","datePublished":"2014-12-31T22:56:25+00:00","dateModified":"2022-02-03T17:24:59+00:00","mainEntityOfPage":{"@id":"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/"},"wordCount":188,"articleSection":["General"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/","url":"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/","name":".htaccess - all you ever wanted to know - ELB Solutions.com Inc.","isPartOf":{"@id":"https:\/\/elbsolutions.com\/projects\/#website"},"datePublished":"2014-12-31T22:56:25+00:00","dateModified":"2022-02-03T17:24:59+00:00","author":{"@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39"},"breadcrumb":{"@id":"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/elbsolutions.com\/projects\/htaccess-ever-wanted-know\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/elbsolutions.com\/projects\/"},{"@type":"ListItem","position":2,"name":".htaccess &#8211; all you ever wanted to know"}]},{"@type":"WebSite","@id":"https:\/\/elbsolutions.com\/projects\/#website","url":"https:\/\/elbsolutions.com\/projects\/","name":"ELB Solutions.com Inc.","description":"Bringing all your IT Pieces together","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/elbsolutions.com\/projects\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/elbsolutions.com\/projects\/#\/schema\/person\/51e717c68f4f5917c63baf88f0896c39","name":"Etienne Bley","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f8971dfb65b25b768415568f83247df4057f15d037137e386928a804e2c997b9?s=96&d=mm&r=g","caption":"Etienne Bley"},"url":"https:\/\/elbsolutions.com\/projects\/author\/etienne-bley\/"}]}},"_links":{"self":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/comments?post=963"}],"version-history":[{"count":5,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/963\/revisions"}],"predecessor-version":[{"id":2770,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/posts\/963\/revisions\/2770"}],"wp:attachment":[{"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/media?parent=963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/categories?post=963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elbsolutions.com\/projects\/wp-json\/wp\/v2\/tags?post=963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}