I need to redirect my WordPress site to HTTP to HTTPS through .htaccess file. (e.g. http://www.example.com) to (e.g. https://www.example.com) Please help me out to do that.
            Asked
            
        
        
            Active
            
        
            Viewed 654 times
        
    0
            
            
        - 
                    Have you tried this? https://stackoverflow.com/a/13997498/6244709 – Serraniel Jul 05 '17 at 06:37
- 
                    1Or this: https://stackoverflow.com/questions/4083221/how-to-redirect-all-http-requests-to-https – Picard Jul 05 '17 at 06:39
- 
                    Thanks @Picard it's working for me Great :) – Vigneshwaran J Jul 05 '17 at 06:40
1 Answers
1
            Redirect to the https in wordpress. And wordpress ttake over your all requests.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
 
    
    
        Harman Cheema
        
- 152
- 1
- 3
- 11
- 
                    Here why you mention the blog in Rewrite rule i am unable understand that. – Vigneshwaran J Jul 05 '17 at 06:46
