Ads Top

http to https redirect htaccess wordpress

Editing .htaccess File
There are instructions/directives in the .htaccess file that tell the server how to act in certain scenarios and directly affects how your website functions. Common directives in .htaccess file:

Rewriting URLs
Ways to edit a .htaccess file:

Edit the file on your computer and upload it to the server using FTP.
Use “Edit” mode in FTP program that allows you to edit a file remotely.
Use a text editor and SSH to edit the file.
Use the File Manager in cPanel to edit the file.
Editing .htaccess in cPanel File Manager
Note Backup your website in case something goes wrong.

Login to cPanel
Files > File Manager > Document Root for:
Now select the domain name you want to access
Check “Show Hidden Files (dotfiles)”
Click “Go”
After a new tab or window opens, look for the .htaccess file.
Right click on the .htaccess file and click on “Code Edit” on the menu.
A dialogue box may pop up asking about encoding. Click “Edit” button to continue.
Edit the file
“Save Changes” when done.
Test your website to make sure it is done correctly. In case, there is an error, restore to the previous version and try again.
Once you are done, click “Close” to close the window.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

1 comment:

  1. First time I am visiting your site. I found so many entertaining stuff in your blog, especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the leisure here! Keep up the excellent work. So I am regular user of this site. All the stories you shared here are interesting and excellent. It helps to boost the knowledge. Thank you so much and please keep sharing such informative post in future. It is easy to get pan card online application in order to apply for a pan card through panseva and also one can track the status of pan card once it is applied.


Powered by Blogger.