• Hi,

    How we can redirect contents under directory from http to https.

    I tried adding beloe entry in .htaccess file.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    RewriteCond %{HTTPS} !=on
    RewriteRule ^/abc https://test.com/abc$1 [R,L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    where abc is directory name.

    This is not working.

    Please suggest

Viewing 1 replies (of 1 total)
  • Thread Starter nemalh

    (@nemalh)

    Hi,

    This worked using

    #redirect all http traffic to https, if it is pointed at /checkout
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} ^/checkout/?.*$
    RewriteRule ^(.*)$ https://mydomain.com/$1 [R=301,L]

    Thanks,
    Neha

Viewing 1 replies (of 1 total)
  • The topic ‘How to redirect contents under directory from http to https’ is closed to new replies.