logo
down
shadow

htaccess redirect http to https on a magento site


htaccess redirect http to https on a magento site

By : Steve
Date : November 22 2020, 07:01 PM
To fix the issue you can do I have a magento site and i need to have it redirect to https, i have the cert installed but i am not sure how to mod the htaccess file? here is a copy of the root htaccess file thanks
code :


Share : facebook icon twitter icon
.Htaccess rules to redirect respective HTTP links to HTTP and HTTPS to HTTPS?

.Htaccess rules to redirect respective HTTP links to HTTP and HTTPS to HTTPS?


By : Jagat Kumar Chaudhar
Date : March 29 2020, 07:55 AM
htaccess rewriterule: redirect http to https or https to http (both ways) depending on URL typed

htaccess rewriterule: redirect http to https or https to http (both ways) depending on URL typed


By : dkacher
Date : March 29 2020, 07:55 AM
To fix the issue you can do Try adding the following to your htaccess file in the root directory of your site.
code :
RewriteEngine on
RewriteBase /

#determine if page is supposed to be http
#if it has p=home or p=home1 or qqq=home in querystring
RewriteCond %{QUERY_STRING} (^|&)(p=home1?|qqq=home)(&|$) [NC,OR]
#or if query string is empty
RewriteCond %{QUERY_STRING} ^$
#set env var to 1
RewriteRule ^ - [E=IS_HTTP:1]


#all pages that are supposed to be http redirected if https
RewriteCond %{HTTPS} on
RewriteCond %{ENV:IS_HTTP} 1
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R,L=301]

#all other pages are sent to https if not already so
RewriteCond %{HTTPS} off
RewriteCond %{ENV:IS_HTTP} !1
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R,L=301]
Using HTACCESS to rewrite index.html AND redirect http://site.com to http://www.site.com

Using HTACCESS to rewrite index.html AND redirect http://site.com to http://www.site.com


By : Sweet_William
Date : March 29 2020, 07:55 AM
it fixes the issue I did not understand the first code on your question, however you can still try this one:
code :
Options +FollowSymlinks
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R,NE]
Options +FollowSymlinks
RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{REQUEST_URI} !^/index.html$
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R,NE]

RewriteRule ^index.html$ http://www.mycustomcloset.com [R,NE]
htaccess to redirect all trafic from http to https but to also redirect to index.php which is hidden once on https

htaccess to redirect all trafic from http to https but to also redirect to index.php which is hidden once on https


By : Scott B
Date : March 29 2020, 07:55 AM
it should still fix some issue I am looking for a .htaccess file which can do the following, I've managed to get each function to work individually but not together. , Try these rules:
code :
Options +FollowSymlinks
RewriteEngine On

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url_path=$1 [L,QSA]
How to redirect site to https and http using htaccess for specific file and folder

How to redirect site to https and http using htaccess for specific file and folder


By : dynoMan
Date : March 29 2020, 07:55 AM
This might help you I have a wordpress site that I wanna change https to http for only '/wp-admin' and 'wp-login.php'. I wanna use .htaccess to achieve it, but I m not good at regular expressions. Below is my current htaccess codes. , Replace your Rules with this :
code :
RewriteEngine on
#http to https except "/wp-admit" and "/wp-login.php"
RewriteCond %{HTTPS} !on
RewriteRule ^((?!wp-admin.*|wp-login\.php).*)$ https://%{HTTP_HOST}%{REQUEST_URI} [NE,L,R]
#Redirect "/wp-admin" and "/wp-login.php" to http if accessed using https scheme
RewriteCond %{HTTPS} on
RewriteRule ^(wp-admin.*|wp-login\.php)$ http://%{HTTP_HOST}%{REQUEST_URI} [NE,L,R]
Related Posts Related Posts :
  • Problem PHP with cURL
  • JQuery and PHP validation problem?
  • Join with three tables
  • Using windows authentication with php?
  • Uploading images from server using Php
  • Adding a third table to a Join
  • how to write this conditions in php
  • MySQL: Get only count of result set
  • PHP OOP about reference
  • the data can't display in the form
  • Pass-by-Reference Error
  • php boolean help
  • Problem with PHP & MySQL
  • How to implement a Bloom Filter in PHP?
  • Calling C/C++ library function from PHP
  • Fancybox for .flv
  • <? ?> tags not working in php 5.3.1
  • Remove a child from an array in PHP?
  • problems with sending mail
  • shadow password
  • change password
  • how to convert object into string in php
  • sort associative array PHP
  • encryption in php
  • PHP: line charts
  • Rewrite URL in PHP without htaccess
  • PHP import functions
  • PHP AND SOAP. Change envelope
  • Is this query vulnerable to sql injection?
  • how to submit a from with validation in PHP?
  • Enter ID instead of name on submit (form)
  • using a href (html)tag along with PHP
  • About Php development
  • Paypal integration with PHP
  • how to use a pear package?
  • How to enable PDO_MYSQL for CLI?
  • php variable scope in oop
  • Why can't I use a constant in a php object?
  • select top 50 records from sql
  • encoding problem
  • How do I make a HTTP POST request to an url from within a c++ dll?
  • Saving image to server with php
  • help with validate field
  • PHP Get only a part of the full path
  • How to declare more than one header on PHP
  • How to write in pdo method
  • Options for PHP CLI on windows
  • Which is the best php opensource e-commerce for handle 5 million prducts import daily?
  • $_SERVER['HTTP_X_REQUESTED_WITH'] seemingly not available on PHP 5.1.6
  • radio value lost by $_post array
  • Tool to add code highlighting and export to HTML
  • youtube video downloaded successfully on local, but on server(online) only 0 byte flv is downloading
  • Populating a Dropdown list in PHP dynamically
  • Why is turning magic_quotes_gpc on considered a bad practice?
  • Replace html text in javascript include
  • OOP Design - Where/When do you Validate properties?
  • RSA Encrypt in PHP to decrypt in .NET
  • Encrypting with Perl CBC and decrypting with PHP mcrypt
  • Code equivalence between Javascript and PHP
  • How to track DHL in our site from DHL site , by PHP
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk