Title: Hard coded for http
Last modified: August 20, 2016

---

# Hard coded for http

 *  Resolved [chris.bair](https://wordpress.org/support/users/chrisbair-1/)
 * (@chrisbair-1)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/hard-coded-for-http/)
 * The plugin is hard coded for http. If you are using https you’re going to need
   to change line 15 of sentry.php
 *     ```
       $clean_URI = str_replace('www.','',strtolower('https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']));
       ```
   
 * [http://wordpress.org/extend/plugins/friends-only/](http://wordpress.org/extend/plugins/friends-only/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Gabe](https://wordpress.org/support/users/gabrielwhite/)
 * (@gabrielwhite)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/hard-coded-for-http/#post-3503094)
 * Good point. Do you know of a way to detect whether a site is using HTTP or HTTPS?
 * Gabe
 *  Thread Starter [chris.bair](https://wordpress.org/support/users/chrisbair-1/)
 * (@chrisbair-1)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/hard-coded-for-http/#post-3503095)
 * according to [http://php.net/manual/en/reserved.variables.server.php](http://php.net/manual/en/reserved.variables.server.php)
   $_SERVER[‘HTTPS’] will be set if it’s https
 *  Thread Starter [chris.bair](https://wordpress.org/support/users/chrisbair-1/)
 * (@chrisbair-1)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/hard-coded-for-http/#post-3503096)
 * There’s also a note on that page to escape REQUEST_URI to avoid a XSS vulnerability
   htmlspecialchars($_SERVER[‘REQUEST_URI’]);
 *  Plugin Author [Gabe](https://wordpress.org/support/users/gabrielwhite/)
 * (@gabrielwhite)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/hard-coded-for-http/#post-3503097)
 * Great, thanks! Will roll this into a new release in the coming week or so.
 *  Plugin Author [Gabe](https://wordpress.org/support/users/gabrielwhite/)
 * (@gabrielwhite)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/hard-coded-for-http/#post-3503136)
 * I’ve made a new beta version that should fix the problem.
 * It would be great if you could download it and test it out:
 * [https://dl.dropbox.com/u/15414097/friends-only-beta.zip](https://dl.dropbox.com/u/15414097/friends-only-beta.zip)
 * Thanks!
 * Gabe

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Hard coded for http’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/friends-only.svg)
 * [Friends Only](https://wordpress.org/plugins/friends-only/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/friends-only/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/friends-only/)
 * [Active Topics](https://wordpress.org/support/plugin/friends-only/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/friends-only/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/friends-only/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Gabe](https://wordpress.org/support/users/gabrielwhite/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/hard-coded-for-http/#post-3503136)
 * Status: resolved