w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Facebook like button https issue: protocol mismatch from http and https
Reviewing the js code on Facebook there are multiple urls containing hard coded strings for http://static .../rsrc.php it's possible those are the files triggering the error. This may be something Facebook needs to update. On a side note, it may be possible to download that js file from Facebook and store it on your server and remove the hard coded http string. I would test this further but I am on my phone at the moment.

Categories : Facebook

How do you enable https and http->https redirects in ring / compojure
It's possible to serve HTTPS with clojure, but it's much more popular to put nginx or something like that in front of your ring server. If you can figure out how to configure jetty, though, run-jetty clearly supports SSL.

Categories : Http

Amazon Route 53 to map an address like https://my-elb-address:88888/my-app-name
There's a few problems with that: First, DNS cannot include port numbers. Second, DNS cannot include a path. Third, the maximum port number is 65535, so even if DNS did let you add a port number, that port number is too high. You'll probably want to just send your domain directly to the server. Use apache to reverse proxy 80/443 to 8080/8009 (glassfish default ports for http/ajp), and just add a mod_rewrite rule that redirects / to /my-app.

Categories : Amazon

Redirect all http AND https non-www URLS to https://www.xyz.com via htaccess
In case anyone from the future (HELLO PEOPLE OF THE FUTURE) stumble across this, I asked the same question and had it answered over at Server Fault. Short version: impossible. Long version: http://serverfault.com/questions/523199/redirect-all-http-and-https-non-www-urls-to-https-www-example-com-via-htaccess

Categories : Htaccess

Can https fallback to http and security level of https
No, HTTPS never falls back to HTTP automatically. It would take deliberate action by the user. If you're just going to a web page by putting its URL into the address bar, this is easy; for form submission it's harder. Yes, sending plain text over SSL is fine. In fact, sending a hashed password doesn't really increase security much at all -- if someone manages to sniff the connection and gets the hashed password, that's all they need to be able to login to the site. It has one small advantage: if the user uses the same password at multiple sites, learning the hashed password for one site doesn't help them get into another site that uses a different (or no) hash. And it's not likely to be feasible to send salted hashes, since the client doesn't know the salt. A cnonce adds an extra level

Categories : Asp Net

C HTTP Server & OpenSSL - Works fine for HTTP - Multiple/rapid/concurrent connections being dropped using HTTPS
You should call SSL_accept() in your request handling thread. This will allow your listening thread to process the TCP accept/listen queue more quickly, and reduce the chance of new connections getting a RESET from the TCP stack because of a full accept/listen queue. SSL handshake is compute intensive. I would guess that your spammer is probably not using SSL session cache, so this causes your server to use the maximum amount of CPU. This will cause it to be CPU starved in regards to servicing the other connections, or new incoming connections.

Categories : C

Htaccess redirects http://www... to https://www..., but does not redirect http://www
Try this: RewriteEngine On #not https RewriteCond %{HTTPS} off RewriteRule .* https://www.metalmetalland.com%{REQUEST_URI} [R=301,L] #https, but not www RewriteCond %{HTTP_HOST} !^www. RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Categories : Apache

htaccess rewrite all using http:// or http://www. to https except for one or two URI
Move the rewrite condition to the part where http: is ON not where https: is already ON. RewriteCond %{HTTPS} !=on RewriteCond %{REQUEST_URI} !^/folder/next_folder/custom_id RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^www.(.*)$ RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Categories : Htaccess

Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]
You can't host net.tcp under IIS 6, it supports only HTTP(s). So you are limited with HTTP bindings only (basic, ws or 2007). In order to provide net.tcp and other protocols, WAS is required. You can activate it standalone, but I advice you to install it both with IIS 7 (it is installed as a part of it), because IIS 7 gives a convinient service management platform in addition. Another solution it so change the hosting environment to make it self-hosted or service-hosted, using ServiceHost class instance, which supports tcp protocol.

Categories : Wcf

could not read Username for 'https://github.com': No such device or address
I think you need to set the git config via the command line. See the github setup documentation: https://help.github.com/articles/set-up-git#platform-all $ git config --global user.name "Your Name Here" $ git config --global user.email "your_email@example.com" Etc.

Categories : GIT

Moving to https = Could not find a base address that matches scheme
You need to change the configuration for the service so that the HTTPS enabled bindings are used. You may want to check out this blog post: http://weblogs.asp.net/srkirkland/archive/2008/02/20/wcf-bindings-needed-for-https.aspx The suggested solution there is to define a custom binding within web.config/app.config and set its security mode to Transport: <bindings> <webHttpBinding> <binding name="webBinding"> <security mode="Transport" /> </binding> </webHttpBinding> </bindings> Then use this binding in the binding configuration for the endpoint: <endpoint address="" behaviorConfiguration="..." binding="webHttpBinding" bindingConfiguration="webBinding" contract="..." />

Categories : Wcf

Why does the CDN's have 2 // instead of http or https in front of the URL
It's just like omitting the domain: href="/folder/file.html" where the browsers just assumes the current domain. In your case the browser will assume the current protocol. Absolute URLs omitting the protocol (scheme) in order to preserve the one of the current page

Categories : Javascript

htaccess from https to http
I am not able to test the rules, but I think you need to change the following: In the first rule your flag is attached to the 2nd argument. This should create an internal error. Your second rule would rewrite all url's to their http equivalent, making an infinite loop. You need to make sure it doesn't match url's that you want to be in https. You can do this with %{REQUEST_URI} and a negation (!). As far as I am aware, L=301 is an invalid flag too. You probably meant to make it R=301. RewriteCond %{HTTPS} off RewriteRule ^(checkout.php|final.php|admin/(.*))$ https://{HTTP_HOST}/$1 [R,L] RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !/(checkout.php|final.php|admin/(.*))$ RewriteRule ^http://%{HTTP_HOST}%{REQUEST_URI} [R,L] Last but not least an word of advice. Don't test your .hta

Categories : Apache

Vpn access when only http and https are available
I managed to find a program that does the job. I don't know how secure it is exactly but it's display is much better than teamviewer. Columbus remote desktop. So basically i establish a vpn connection using network connect already configured by the network administrator of the network at the office. Then I just had to use the IP address of my computer at the office to connect. Thanks and best wishes to you.

Categories : Http

Force HTTP instead of HTTPS
You could use the following: [HttpPost] public ActionResult Logon(string user, string pwd, bool remember) { var url = Url.Action("someAction", "someController", null, "http"); return Redirect(url); } But don't do that. NEVER transmit a session cookie over an unencrypted channel. Once the user is authenticated and you have emitted him an authentication cookie, everything that this user does on your website should be sent over SSL. I would also recommend you emitting your forms authentication cookies with the secure flag (requireSSL="true" in your web.config).

Categories : Asp Net Mvc

HTTPS on same port as HTTP?
You don't have to listen to both HTTP and HTTPS on the same port, in your specific case of writing a proxy server. Browsers connect to proxy servers via HTTP, whether for proxying HTTP or HTTPS requests. HTTPS requests use the CONNECT HTTP method to open a direct connection to the HTTPS server---that CONNECT request is still done in the unencrypted portion of the proxy traffic. Edit: Here's what I think your code should look like: http.createServer(function (request, response) { // Handle normal requests here }).on('connect', function (request, socket, head) { // Handle CONNECT requests here }).listen(3128);

Categories : Node Js

Redirect HTTPS to HTTP and NON WWW to WWW
You can combine: RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} and RewriteCond %{HTTP_HOST} ^ties.co.uk$ RewriteRule (.*) http://www.ties.co.uk/$1 [R=301,L] into a single rule that needs to be right below RewriteEngine On: RewriteCond %{HTTPS} on [OR] RewriteCond %{HTTP_HOST} ^ties.co.uk$ [NC] RewriteRUle ^(.*)$ http://www.ties.co.uk/$1 [R=301,L]

Categories : Apache

add www on http and remove www on https
Try this: RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^example.org$ [NC] RewriteRule ^(.*)$ http://www.example.org/$1 [R=301,L] RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^www.example.org$ [NC] RewriteRule ^(.*)$ https://example.org/$1 [R=301,L] Your second HTTP_HOST condition still checks that the www. is missing, which should be the other way around.

Categories : Apache

Use both http and https for socket.io
I have done something similar and it required two socket.io instances. Something like this: var express = require('express'); var oneServer = express.createServer(); var anotherServer = express.createServer(); var io = require('socket.io'); var oneIo = io.listen(oneServer); var anotherIo = io.listen(anotherServer); Of course that you will need to inject messages twice: for both socket.io instances. A good option is delegate SSL handling to stunnel and forget about SSL in your code.

Categories : Node Js

Angularjs - Using $http on a HTTPS URL
You might need to tell it to send the cookie: In your config, DI $httpProvider and then set withCredentials to true: .config(function ($routeProvider, $httpProvider) { $httpProvider.defaults.withCredentials = true; //rest of route code Info on angularjs withCredentials: http://docs.angularjs.org/api/ng.$http Which links to the mozilla article: https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS?redirectlocale=en-US&redirectslug=HTTP_access_control#section_5

Categories : Javascript

Can a published Web App use HTTP instead of HTTPS?
There is no way to do this today. If you access a web app over HTTP it will immediately get redirected to HTTPS. There are no plans to change this as of now but please log an enhancement request here with details - https://code.google.com/p/google-apps-script-issues/issues/list

Categories : Google Apps Script

How to replace "http:" with "https:" in a string with C#?
Use string.Replace and some LINQ: var httpsLinks = links.Select(l=>l.Replace("http://", "https://");

Categories : C#

jquery validator - http | https | ftp | www
add a && value.substr(0, 8) != 'https://' to your code ,like : $.validator.addMethod("cus_url", function (value, element) { if (value.substr(0, 7) != 'http://' && value.substr(0, 8) != 'https://') { value = 'http://' + value; } or use regex like: if (!value.match(/^http(s?):///)) otherwise your https://www.facebook.com will become http://https://www.facebook.com

Categories : Jquery

Redirect a website from http to https
This solution helped me. <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://domain.name/$1 [R,L] </IfModule> I hope it'll be helpfull for you too.

Categories : Apache

Replace double http:// or https://
Your code is obviously wrong - it should be: } else if (iurl.substring(0, 14) == 'http://http://') { // ^ not https A simpler alternative: function replacehttp() { var iurl = document.getElementById('url').value; iurl = iurl.replace(/^http://(https?://)/, '$1'); document.getElementById('url').value = iurl ; generate(); }

Categories : Javascript

SSL http to https redirection using drupal
From https://drupal.org/https-information: Drupal configuration If you want to support mixed-mode HTTPS and HTTP sessions open up sites/default/settings.php and add $conf['https'] = TRUE;. This enables you use the same session over HTTP and HTTPS both -- but with two cookies where the HTTPS cookie is sent over HTTPS only. You will need to use contributed modules like securepages to do anything useful with this mode, like submitting forms over HTTPS and so on. While your HTTP cookie is still vulnerable to all usual attacks, a hijacked insecure session cookie can only be used to gain authenticated access to the HTTP site. It will not be valid on the HTTPS site. Whether this is a problem or not depends on the needs of your site and the various module configurations. For example, if all

Categories : Apache

Redirecting HTTP to HTTPS with Apache
Your problem here is the initial HTTP request: This won't work as the server won't understand it receiving the request on port 443 (as the response code suggests). If no port is given, the protocol http defaults to port 80, https to port 443. This is also the reason why your local redirect works. I bet, if you access the page through http://website/ (with proper port forwarding of port 80), it will work as well. Also note that your VirtualHost is only defined for port 80 anyway, so it won't be valid for requests sent to website:5443 (or website:443). In general, you'd need a server accepting both HTTP and HTTPS requests on a single port. Not sure any popular server actually supports something like that, because (I think) it essentially violates the specs.

Categories : Apache

Redirect to HTTP non-www to HTTPS www htaccess
Try it like this: RewriteEngine On RewriteCond %{HTTP_HOST} !^www. [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301] The only real difference here is that first we redirect from non-WWW to WWW then we check for HTTPS and redirect it. If it does work then try this one: RewriteEngine On RewriteCond %{HTTP_HOST} !^www. [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]

Categories : Htaccess

Hosting site on http and https
You could make an an actionfilter to check for https. [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] public class HttpsOnlyAttribute : ActionFilterAttribute { /// <summary> /// Called by the MVC framework before the action method executes. /// </summary> /// <param name="filterContext">The filter context.</param> public override void OnActionExecuting(ActionExecutingContext filterContext) { if (!filterContext.HttpContext.Request.IsSecureConnection) { throw new HttpException(404, "HTTP/1.1 404 Not Found"); } } } Just place the attribute on top of the controllers you want to be https only [HttpsOnly] public class SecureController : Controlle

Categories : Asp Net

Facebook http / Https error
Read on Same Origin Policy - http://en.wikipedia.org/wiki/Same_origin_policy - Basically both endpoints need to have matching protocols. Either change the iframe source to match the request endpoint or vice-versa

Categories : Javascript

In Pyramid how can I redirect from http to https?
Some unsolicited advice - Don't redirect to SSL from non-SSL. There's a security issue. Basically, if someone manages to Man-In-The-Middle your non-SSL'd service, they could redirect it to an SSL service running with a valid certificate on a different server - the user might not notice this. It's better to provide a page that warns the user and provides a plain-text link for them to click.

Categories : Python

heroku ssl endpoint - http vs https
I'm not 100% sure what you question is but if you only want HTTPS for certain parts(urls) of your website and assuming you are using rails you can add the gem 'rack-ssl-enforcer', this will allow you to specify what parts of your website redirect to https i.e. login

Categories : Ssl

Express (node.js) using HTTPS and HTTP
Try this approach.Create two express request handlers(app_http and app_https). Pass app_http as request handler while creating http server(http.createServer(app_http)). Pass app_https as request handler while createing https server (https.createServer(options,app_https)). var express = require('express'), http = require('http'), https = require('https'); var app_http = express(); // this one to handle http request var app_https = express(); // this to handle httpS requests. app_https.get('/connect', function(req, res){ // Must be on HTTPS, if not redirect to HTTPS }); app_https.post('/connect', function(req, res){ // Must be on HTTPS }); app_http.get('/', function(req, res){ // Must be on HTTP }); app_http.get('/build', function(req, res){ // Must be on HTTP });

Categories : Javascript

getting trace from ruby Net::HTTP with https
I think it is impossible to get the raw HTTP headers from Net::HTTPResponse, because it parses the headers while it is receiving the data. See HTTPResponse#read_new

Categories : Ruby

Parsing HTTPS instead of HTTP in Rails
would be helpful if you showed us some code? try setting these attributes # assuming http is generated like this http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true # might need this as well? http.verify_mode = OpenSSL::SSL::VERIFY_NONE

Categories : Ruby On Rails

using Mod_rewrite to redirect HTTP to HTTPS
are you trying it on localhost or on a live server? Redirect http to https (SSL for entire website) try this in .httaccess RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} or RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$ RewriteRule ^(.*)$ - [env=askapache:%2] # redirect urls with index.html to folder RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /([^/]+/)*index.html HTTP/ RewriteRule ^(([^/]+/)*)index.html$ http%{ENV:askapache}://%{HTTP_HOST}/$1 [R=301,L] # change // to / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.*)//(.*) HTTP/ [NC] RewriteRule ^.*$ http%{ENV:askapache}://%{HTTP_HOST}/%1/%2 [R=301,L]

Categories : Apache

Changing the protocol from HTTPs to HTTP
You can use svn relocate to switch the protocol. Please note that svn will emit a warning if the repositories are different (according to a UID) and you can mess up all if the repositories are really different.

Categories : Svn

Redirect website from http to https
I can see that you've taken the code snipet from Steve Marx example The problem is that you have whitespace in your rule name. Just remove them and it will work. The name attribute of rule must not have spaces; the rule won’t work correctly in IIS on Azure with spaces in the name. Find the full article here: Azure https guide

Categories : C#

Apache to force certain URL for HTTP and all others go via https
You have too many slashes in your condition to check against the %{REQUEST_URI}. Remove the ones inside the parentheses: RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} !^/(abc|def|ghi) RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} ^/(abc|def|ghi) RewriteRule ^(.*)$ http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

Categories : Regex

Same domain JSON from HTTP to HTTPS
As mentioned in the comments, you are trying to make a Cross Origin (CORS) XMLHttpRequest. This is because URI Scheme is defined as part of the origin of a request. This is possible, but requires both the client and server to pass certain headers between each other to validate that the connection is allowed. The error you're getting means that your server does not send the correct response headers for you to be able to make CORS XMLHttpRequests to it. For info on the headers you need see the W3C spec. For more practical information on support in most browsers see this article. Using jQuery, if your server supports it, you can make a CORS request by using the ajax function directly instead of calling it using getJSON. Another option is changing to using JSONP and script tag injection

Categories : Jquery



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.