Magento HTTPS on all websites: URL redirects to homepage


username

I'm using Magento 1.9.1 and I'm having issues with SSL.

I want to use https on all sites, on all pages. The site is in the subfolder /shop/.

When I set the base URL (not secure) on the https version, it works, but I have a problem: when I visit the URL with http, it doesn't redirect to the https version of the page, but simply directly redirects to the https version of the store's home page.

So for example:

http://www.site.ext/shop/category/ redirects to https://www.site.ext/shop/

can you help me?

Here is the htaccess on /shop/:

############################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it might be /cgi-bin/php-cgi

#    Action php5-cgi /cgi-bin/php5-cgi
#    AddHandler php5-cgi .php

############################################
## GoDaddy specific options

#   Options -MultiViews

## you might also need to add this line to php.ini
##     cgi.fix_pathinfo = 1
## if it still doesn't work, rename php.ini to php5.ini

############################################
## this line is specific for 1and1 hosting

    #AddType x-mapp-php5 .php
    #AddHandler x-mapp-php5 .php

############################################
## default index file

    DirectoryIndex index.php

<IfModule mod_php5.c>

############################################
## adjust memory limit

    php_value memory_limit 512M
    php_value max_execution_time 18000

############################################
## disable magic quotes for php request vars

    php_flag magic_quotes_gpc off

############################################
## disable automatic session start
## before autoload was initialized

    php_flag session.auto_start off

############################################
## enable resulting html compression

    #php_flag zlib.output_compression on

###########################################
# disable user agent verification to not break multiple image upload

    php_flag suhosin.session.cryptua off

###########################################
# turn off compatibility with PHP4 when dealing with objects

    php_flag zend.ze1_compatibility_mode Off

</IfModule>

<IfModule mod_security.c>
###########################################
# disable POST processing to not break multiple image upload

    SecFilterEngine Off
    SecFilterScanPOST Off
</IfModule>

<IfModule mod_deflate.c>

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

    # Insert filter on all content
    ###SetOutputFilter DEFLATE
    # Insert filter on selected content types only
    #AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript

    # Netscape 4.x has some problems...
    #BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    #BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    # Don't compress images
    #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    #Header append Vary User-Agent env=!dont-vary

</IfModule>

<IfModule mod_ssl.c>

############################################
## make HTTPS env vars available for CGI mode

    SSLOptions StdEnvVars

</IfModule>

<IfModule mod_rewrite.c>

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    RewriteBase /shop/

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php

    RewriteRule .* index.php [L]

</IfModule>


############################################
## Prevent character encoding issues from server overrides
## If you still have problems, use the second line instead

    AddDefaultCharset Off
    #AddDefaultCharset UTF-8

<IfModule mod_expires.c>

############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires

    ExpiresDefault "access plus 1 year"

</IfModule>

############################################
## By default allow all access

    Order allow,deny
    Allow from all

############################################
## If running in cluster environment, uncomment this
## http://developer.yahoo.com/performance/rules.html#etags

    #FileETag none
AddHandler application/x-httpd-php54 .php .php5 .php4 .php3
Seth Malaki

try again laterRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Related


Magento HTTPS on all websites: URL redirects to homepage

username I'm using Magento 1.9.1 and I'm having issues with SSL. I want to have https on all sites, on all pages. The site is in the subfolder /shop/. When I set the base url (not secure) on the https version, it works, but I have a problem: when I visit the U

Magento HTTPS on all websites: URL redirects to homepage

username I'm using Magento 1.9.1 and I'm having issues with SSL. I want to use https on all sites, on all pages. The site is in the subfolder /shop/. When I set the base URL (not secure) on the https version, it works, but I have a problem: when I visit the UR

Scrapy redirects to homepage for some URL

Aditya I'm new to the Scrapy framework and am currently using it to extract articles from several "health and wellness" sites. For some requests, scrapy redirects to the home page (this behavior is not observed in browsers). Here is an example: Command: scrapy

Scrapy redirects to homepage for some URL

Aditya I'm new to the Scrapy framework and am currently using it to extract articles from several "health and wellness" sites. For some requests, scrapy redirects to the home page (this behavior is not observed in browsers). Here is an example: Command: scrapy

Show all products in magento homepage

username I have a class structure like this. -Default Category (0) --Ravi varma (2) ---Nature (2) ---Religious (0) --Da Vinci (2) --Michelangelo (1) --Picasso(1) Default categoryYes root categoryand all other subcategories. S

Magento controller URL redirects to dashboard

Vedventura Basically, when trying to create an inbox message, "read details" should redirect the user to a custom controller, but I can see the desired URL in the browser for a second and then redirect it to the dashboard; currently, this is what I'm trying to

Magento controller URL redirects to dashboard

Vendetura Basically, when trying to create an inbox message, "read details" should redirect the user to a custom controller, but I can see the desired URL in the browser for a second and then redirect it to the dashboard; currently, this is what I'm trying to

Magento subcategory URL redirects to 404

Albin Magento version: 1.8 CE I have 2 stores: store 1 and store 2 The root category of store 1 has subcategories A, B and C I want store 2 to list all subcategories in store A (ie A, B and C) Here is the code I am using now: $_rootCatId = 7; $_rootCategor

Magento controller URL redirects to dashboard

Vedventura Basically, when trying to create an inbox message, "read details" should redirect the user to a custom controller, but I can see the desired URL in the browser for a second and then redirect it to the dashboard; currently, this is what I'm trying to

Magento subcategory URL redirects to 404

Albin Magento version: 1.8 CE I have 2 stores: store 1 and store 2 The root category of store 1 has subcategories A, B and C I want store 2 to list all subcategories in store A (ie A, B and C) Here is the code I am using now: $_rootCatId = 7; $_rootCategor

WordPress redirects all HTTPS to HTTP

username We have a WordPress site and used to have an SSL certificate. The site used to be HTTPS, now we don't need SSL anymore, so we let it expire. We have changed the " Site Address" and " WordPress Address " in the admin panel to .http://example.com https:

Apache redirects all to www https

d1ch0t I am currently using the following in the .htaccessfile : RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] ..but I also want all requests to be redirected to https://www.example.com. For now, any requests h

WordPress redirects all HTTPS to HTTP

username We have a WordPress site and used to have an SSL certificate. The site used to be HTTPS, now we don't need SSL anymore, so we let it expire. We have changed the " Site Address" and " WordPress Address " in the admin panel to .http://example.com https:

Apache redirects all to www https

d1ch0t I am currently using the following in the .htaccessfile : RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] ..but I also want all requests to be redirected to https://www.example.com. For now, any requests h

Two websites on the same server have wrong https redirects

heck I have two websites, called example-1.com and example-2.com , deployed on the same server ( CentOS 7.5 ), both served by apache on port 80. Redirection is performed through virtual hosts (see below for full configuration). For both sites, I'm (permanently

Magento redirects all .htaccess to keep managed

Tiago Silva We did our new website and we are all in our hosting at the moment. We have done a 301 redirect from the old site to the new site. RewriteEngine On RewriteCond %{THE_REQUEST} !/new/ [NC] RewriteRule !^new/ /new%{REQUEST_URI} [NC,R=301,L] Now ever

Magento redirects all .htaccess to keep managed

Tiago Silva We did our new website and we are all in our hosting at the moment. We have done a 301 redirect from the old site to the new site. RewriteEngine On RewriteCond %{THE_REQUEST} !/new/ [NC] RewriteRule !^new/ /new%{REQUEST_URI} [NC,R=301,L] Now ever

How to parse an https URL that redirects to another URL

Giardolio I am trying to parse this URL https://graph.facebook.com/4/picture?width=378&height=378 But it redirects me to another link: https://zn.ak.fbcdn.net/profile.ak/hprofile-ak-xfp1/v/t1.0-1/p480x480/10390028_10102210419817761_5871103530921178170_n.jpg?oh

nginx redirects all http to https with exception

MBA12 I want to redirect all http traffic to https with few exceptions. Anything with /exception/ in the url, I want to stay on http. Tried the suggestions below, redirecting all http in nginx to https (except one file) But it doesn't work. The /exception/ url

nginx redirects all http to https with exception

MBA12 I want to redirect all http traffic to https with few exceptions. Anything with /exception/ in the url, I want to stay on http. Tried the suggestions below, redirecting all http in nginx to https (except one file) But it doesn't work. The /exception/ url

nginx redirects all non WWW to HTTPS WWW

username Here is what happens: example.com -> https://example.com http://example.com -> https://example.com www.example.com -> -> https://www.example.com This is what I want: example.com -> https://www.example.com http://example.com -> https://www.example.co

NGINX redirects all to https (except one directory)

Rob Diablo I've scoured stackoverflow for answers and everything suggested, but trying without success. My website redirects users to always use SSL (https). However, I have a chat application that cannot be used over SSL because it is not licensed to use the

nginx redirects all http to https with exception

MBA12 I want to redirect all http traffic to https with few exceptions. Anything with /exception/ in the url, I want to stay on http. Tried the suggestions below, redirecting all http in nginx to https (except one file) But it doesn't work. The /exception/ url

nginx redirects all non WWW to HTTPS WWW

username Here is what happens: example.com -> https://example.com http://example.com -> https://example.com www.example.com -> -> https://www.example.com This is what I want: example.com -> https://www.example.com http://example.com -> https://www.example.co

nginx redirects all non WWW to HTTPS WWW

username Here is what happens: example.com -> https://example.com http://example.com -> https://example.com www.example.com -> -> https://www.example.com This is what I want: example.com -> https://www.example.com http://example.com -> https://www.example.co

nginx redirects all http to https with exception

MBA12 I want to redirect all http traffic to https with few exceptions. Anything with /exception/ in the url, I want to stay on http. Tried the suggestions below, redirecting all http in nginx to https (except one file) But it doesn't work. The /exception/ url

NGINX redirects all to https (except one directory)

Rob Diablo I've scoured stackoverflow for answers and everything suggested, but trying without success. My website redirects users to always use SSL (https). However, I have a chat application that cannot be used over SSL because it is not licensed to use the