#1
  1. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Mar 2015
    Location
    Pinkcity
    Posts
    59
    Rep Power
    106

    http to https Redirection For WordPress Website


    I am totally fed up with this thing but still can't figure out any appropriate solution.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://www.sagipl.com/$1 [R,L]
    </IfModule>

    # END WordPress
    Can anyone please tell me, what's wrong in this?
  2. #2
  3. My views are my own ;)
    SEO Chat Good Citizen (1000 - 1499 posts)

    Join Date
    Jun 2012
    Location
    Clifton Park, New York
    Posts
    1,144
    Rep Power
    1490
    I am not an expert so it may not work but I would do this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{SERVER_PORT} 80
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

    RewriteRule . /index.php [L]

    </IfModule>

    # END WordPress
    let me know if it will work

    Disclaimer: This is not my piece of code. I asked my developer for help!
    Everything will be ok in the end

    If it's not ok, it's not the end
  4. #3
  5. No Profile Picture
    Newbie
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jul 2015
    Posts
    3
    Rep Power
    0
    Code:
    .   
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1
    #delete the slash if u dont use it

Similar Threads

  1. Website Running on HTTP and HTTPS
    By Dipti13 in forum New User SEO Questions and Answers
    Replies: 1
    Last Post: Oct 23rd, 2015, 10:46 AM
  2. Can HTTP to HTTPS affects website ranking? WHY??
    By sanjaymaurya in forum Search Engine Optimization
    Replies: 10
    Last Post: Sep 10th, 2014, 11:50 PM
  3. non-www to www redirection still necessary wth wordpress?
    By rpvp in forum Search Engine Optimization
    Replies: 3
    Last Post: Mar 27th, 2013, 06:56 AM
  4. HTTP vs HTTPS
    By Harmstra in forum SEO Help (General Chat)
    Replies: 2
    Last Post: Apr 4th, 2009, 11:46 AM
  5. Regarding https:// and http://
    By georgekalathil in forum Google Optimization
    Replies: 1
    Last Post: Jan 31st, 2008, 06:28 AM

IMN logo majestic logo threadwatch logo seochat tools logo