Posts

Showing posts with the label PHP website solutions

Redirect Full Website http to https by htaccess

Image
Hello freinds, There i will show you how can redirect PHP website http to https by .htaccess file. first go to your cpanel filemanager , open public_html Folder from root. if there not showing htaccess file then click settings on top menu bars, click show hidden files.. now check .htaccess file. edit htacces file. copy this code and paste to htaccess file, write on first line: <IfModule mod_rewrite.c>   RewriteEngine On   RewriteCond %{SERVER_PORT} 80 [OR]   RewriteCond %{HTTPS}  !=on [OR]   RewriteCond %{HTTP_HOST} ^www\.(.*)$ [OR]   RewriteCond %{HTTP_HOST} ^mail\.(.*)$   RewriteRule (.*)$ https://yourdomain.com/$1 [R=301,L]   RewriteCond %{REQUEST_URI} ^/index.php [NC]   RewriteRule ^ / [R,L] </IfModule> Replace " https://yourdomain.com "  with Your Domain Name. Note: if You are using cloudflare DNS then first disable cloudfalre https redirect option.. its very important.. if you want disable this option then follow thi...