1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

http to https redirection for domain and subdomain .htaccess code

Discussion in 'Search Engine Optimization' started by cnjai20, Oct 11, 2018 at 5:15 AM.

  1. #1
    Hello,
    SEMrush
    I am working on a travel website - https://www.tejastravels.com, it's an SSL certified website

    Along with there are few subdomains are present - https://m.tejastravels.com, https://bangalore.tejastravels.com these also SSL certified subdomain websites

    Bug:

    We try to redirect these urls from http to https version by using .htaccess file, but we failed to reach it

    please have a look on the code part, we wrote

    Options +FollowSymLinks -MultiViews
    # Turn mod_rewrite on
    RewriteEngine On

    ExpiresActive On
    ExpiresByType image/jpg "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType application/pdf "access plus 1 month"
    ExpiresByType text/x-javascript "access plus 1 month"
    ExpiresByType application/x-shockwave-flash "access plus 1 month"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresDefault "access plus 2 days"

    # Removes index.php from ExpressionEngine URLs
    RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
    RewriteCond %{REQUEST_URI} !/system/.* [NC]
    RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

    # Directs all EE web requests through the site index file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

    please help us to recover from this issue
     
    cnjai20, Oct 11, 2018 at 5:15 AM IP
    SEMrush