How to Configure SSL Domains Through htacces.


Hello guys, this time i will make a tutorial Which may be useful for you all The tutorial is How to Configure SSL Domains Through htaccess. this tutorial I show for you Who wants to add ssl on his website,ok lets start

First you must instal SSL certificate in your hosting and Make sure your Hosting has got permission Install SSL Free. So you just enter the code below

Copy the code below:

# 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]
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
</IfModule>
<IFModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IFModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE text/css
</IfModule>
# END WordPress

After you copy the above code go to the file manager in your cpanel and search the htacces file then open it.
After opening the file change your htacces file like picture below
Easy is not it? How to Configure SSL Domains Through htacces. Enough for today if there is a mistake I apologize Regards

No comments