Slash before http ("/http://...") drupal - http

Hy. When I move my site to server I get this bug - Page "/http://..." not found. In local host avreverything ok. What could happen?

Your domain site name must be mistype. In any website, there is no domain site nae that begin from /http://.... It must be http://

Be aware that an url starting with slash char "/" refers to HTTP_ROOT of your site.

Related

Redirect loop in wordpress behind Azure Application Gateway

I have domain example.com pointing to Azure Application Gateway
In Application Gateway I use url based routing which routes traffic to Azure App Service (blog.azurewebsites.net), and ssl termination.
App Service this is wordpress site with WP_SITEURL and WP_HOME set to "example.com".
Now, if I go to:
https://example.com/post/ - works well
https://example.com/index.php - works well
https://example.com - redirect loop takes place
I run the WP Site on Azure App Service with Linux Environment.
Once I access my domain with HTTPS and the $_SERVER['REQUEST_SCHEME'] return 'http' instead of 'https'. It caused the problem is the WP Site loads all images, css, js.. with http
I fixed my case with these lines in wp-config.php file.
$_SERVER['HTTPS'] = 'on';
$_SERVER['REQUEST_SCHEME'] = 'https';
Can you try https://example.com/? (with the slash in the end).
Without slash, I guess it is not matching the path based rules.

Hyperlinks missing the http:// prefix render relative to the site and not as external links

The user has an option to enter hyperlinks which are persisted to the database, and then subsequently rendered to a Razor template. Where the user does not specify http://, however, the link is malformed; for example www.test.com renders as http://ourdomain.com/www.test.com.
How should we handle this?
The best thing to do is to run a regular expression on each hyperlink before you save it in the database. If it does not have http:// or https:// then I would just add http:// in front. All https sites will redirect http to https but most sites that do not support https won't smoothly redirect https to http.
An example of a possible regex is:
^(http|https)://
You want to be careful to only replace the http:// or https:// thats at the verify beginning of the string in case those values are used in url parameters

IIS server redirect issue behind Cloudfront

I've got an asp.net website (let's say http://cdn.mysite.com) hosted on IIS and sat behind an Amazon CloudFront Distribution (using a CNAME to access the cdn.* url above, let's say the distribution URL is http://mysite.cloudfront.net).
If a user hits a folder/directory url without a trailing slash, the server will issue a redirect to the origin cdn url, so if a user navigates to http://mysite.cloudfront.net/thanks, they'll end up on http://cdn.mysite.com/thanks/ instead of http://mysite.cloudfront.net/thanks/
Any suggestions of how to fix this in asp.net / iis / cloudfront?
You're right - and rather than fighting it - have you configured CloudFront to whitelist host headers?
For each behaviour > Forward Headers > Select 'Whitelist' > Select 'Host' from the list and hit Add.
This setting ensures that the host header (mysite.cloudfront.net) is included in requests back to the origin (so make sure you've added mysite.cloudfront.net to your site bindings). I'd expect the redirect issued by IIS will use the correct domain name once this configuration is in place.

IIS Rewrite URL To Subfolder

Hi I am trying to match my Request URL and redirect to subfolder from Defauls Website.
My Default Website is crm.domainname.com. If someone try with this request ,it should redirect to crm.domainname.com/subfolder.
I tried this:
But it never redirect my request.
UPDATE
I make change and match with regular expression now.
It Works for 4-5 requests than again it stop redirecting.
The 'Pattern' field is meant to filled with a regular expression. Check this link for configuration options.

Setting up domain.com as the same Meteor deployment as www.domain.com

For a Meteor JS deployment, how do your point domain.com at the same deployment as www.domain.com?
I have the A record pointing at the same IP address as www., but I'm getting the "there is no site deployed at this address message":
http://emiliotelevision.com
It appears Meteor's servers are not smart enough to make the site on www.emiliotelevision.com, which is working, also work for the equivalent with out the www..
Is there a better solution for this than pointing at another one of your own servers configured to redirect to the www. version?
Use a CNAME record for both www.emiliotelevision.com and emiliotelevision.com that points to yourserver.meteor.com
You need to set a domain redirect. emiliotelevision.com should redirect to www.emiliotelevision.com.
Now you can meteor deploy to www.emiliotelevision.com.
You may be able to set up the redirect from where you purchased the domain main.

Resources