MyBB Community Forums

Full Version: SQL Query
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
May be stupid question but I cant figure out a query to replace everyone with http on anything to https, this will help out tons.
Where do you want to change it? Do you mean a redirection to HTTPS (forcing the usage of this protocol)?
(2015-03-27, 08:46 PM)Devilshakerz Wrote: [ -> ]Where do you want to change it? Do you mean a redirection to HTTPS (forcing the usage of this protocol)?

Making people's signatures and stuff to https

But if you know a force https please also include that
You can use this mod_rewrite (.htaccess) rule to redirect visitors to a HTTPS page: http://stackoverflow.com/questions/43989...58#4399158, and this plugin to prevent non-HTTPS content from being displayed (you can't simply replace the protocol in signatures, etc. as it may break things since not every website can be accessed through HTTPS).
This still leaves people with http signatures, I dont want all my 2k members to have to update their signatures, I want a sql command to replace signatures with http to https
(2015-03-27, 09:09 PM)NotNotch Wrote: [ -> ]I want a sql command to replace signatures with http to https

But you do realize it will break most of these images because the sites which host them don't support https? So I don't know why would you prefer that solution over this plugin: http://community.mybb.com/mods.php?action=view&pid=450
(2015-03-27, 10:01 PM)Destroy666 Wrote: [ -> ]
(2015-03-27, 09:09 PM)NotNotch Wrote: [ -> ]I want a sql command to replace signatures with http to https

But you do realize it will break most of these images because the sites which host them don't support https? So I don't know why would you prefer that solution over this plugin: http://community.mybb.com/mods.php?action=view&pid=450

Well I know what it will do, most people have imgur images so it really does not matter if a couple of signatures break and 70% get fixed.
Ok then. You can try this query if you want:
UPDATE mybb_users SET signature = REPLACE(LOWER(signature), '[img]http://', '[img]https://')