Wordpress adding s in http

I am modifying Wordpress and everytime I save it in Editor, it changes links from http to https. How to stop that? It makes absolutely no sense!

Answers


Wordpress (and many other CMS and frameworks) will automatically rewrite your URLs to conserve the protocol you are viewing the page as. This is for a variety of reasons, the strongest of which being something called secure cookie directives. In short, PHP allows you to set HTTPS cookies, or HTTP cookies, but generally not both at the same time.

To counter this, Wordpress segregates your visitors to one protocol. It does so by prefixing all the URLs it generates with the config setting set in Settings -> General under Wordpress Address. If this is set to https://, all the links Wordpress generates will be starting with this URL (apart from offsite links).

If this bothers you, you can change it there. There are also ways to make Wordpress smarter through plug-ins. Have a look to see if you find one that allows you to do what a smart framework does and to keep your HTTP clients on HTTP and HTTPS on HTTPS. It is worth doing if your site allows both, though I would keep everything on https if I were you - it's safer for the user due to end-to-end encryption and authentication.


Need Your Help

Push a branch of a git repo to a new remote (github), hiding its history

git github git-branch remote-branch

My organisation is preparing to release an open-source version of our software using github, however I'm not sure the best way to approach this:

Updating multiple instances of the same dialog fragment

android android-fragments dialog

I have an app where multiple emergency messages can be received. When each message is received it needs to open a dialog with the emergency details. If more than one emergency is received it will s...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.