Hi,
Scenario:
We have a site with an external port of 443 and internal of 444. This is because our hosting provider only allows a single IP for each server instance.
The site is bound to port 444 and the external port for that IP is destination NAT'd to 443.
Problem:
When we access the site with https://site/, we get redirected to https://site:444/ which is of course not available to the outside world, and shouldn't need to be.
This is done with a "301 Moved Permanently", so I can't even fix it with a URL rewrite.
Is there any way we can stop AbleCommerce from redirecting to the port it's bound to?
Thanks in advance!
v7.0.3 In Port Mapped Environment Produces HTTP 301
Re: v7.0.3 In Port Mapped Environment Produces HTTP 301
When you had the license key issued, did you actually have the port number included so it was embedded in the key?
Thank you for choosing AbleCommerce!
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
Re: v7.0.3 In Port Mapped Environment Produces HTTP 301
Hi Katie, thanks for the response!
No, the license doesn't include the port number, as it is being accessed without one (I presume this is correct).
No, the license doesn't include the port number, as it is being accessed without one (I presume this is correct).
Re: v7.0.3 In Port Mapped Environment Produces HTTP 301
The key has your domain embedded, so if you don't have the port number as part of the domain, then the redirect must be coming from your hosting provider. This doesn't sound like an issue with Ablecommerce. Have you asked your host why this happens:Is there any way we can stop AbleCommerce from redirecting to the port it's bound to?
access the site with https://site/, we get redirected to https://site:444/
You shouldn't want to have any port numbers in the URL, regardless of it being SSL or not.
Thank you for choosing AbleCommerce!
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
Re: v7.0.3 In Port Mapped Environment Produces HTTP 301
Thanks again for your response, I really appreciate it.
Unfortunately it must be coming from inside AbleCommerce.
The hosting in this case is a VPS and I have access to IIS and can confirm that other ASP.NET sites in the same setup do not redirect to the internal port.
This isn't uncommon practice, either (it's called destination NAT).
You're right, we really don't want port numbers in our URL, it should be transparent to the outside world.
I know it's a big ask, but maybe you could see if the devs know anything about it?
Thanks again!
Unfortunately it must be coming from inside AbleCommerce.
The hosting in this case is a VPS and I have access to IIS and can confirm that other ASP.NET sites in the same setup do not redirect to the internal port.
This isn't uncommon practice, either (it's called destination NAT).
You're right, we really don't want port numbers in our URL, it should be transparent to the outside world.
I know it's a big ask, but maybe you could see if the devs know anything about it?
Thanks again!
Re: v7.0.3 In Port Mapped Environment Produces HTTP 301
Thanks for your help, but I have found a work-around.
I created an inbound URL rewrite rule to replace SERVER_PORT 444 with 443 and the site now works!
Anybody else out there with this issue:
Create a blank inbound rule with the following (replace 444 with the port you're using, this works with non-SSL http, too):
Match URL
Requested URL:
Matches the Pattern
Using:
Regular Expressions
Pattern:
.*
(checked) Ignore case
Conditions
Input | Type | Pattern
{SERVER_PORT} | Matches the Pattern | 444
Server Variables
Name | Value | Replace
SERVER_PORT | 443 | True
Action
Action type:
None
(checked) Stop processing of subsequent requests
I created an inbound URL rewrite rule to replace SERVER_PORT 444 with 443 and the site now works!
Anybody else out there with this issue:
Create a blank inbound rule with the following (replace 444 with the port you're using, this works with non-SSL http, too):
Match URL
Requested URL:
Matches the Pattern
Using:
Regular Expressions
Pattern:
.*
(checked) Ignore case
Conditions
Input | Type | Pattern
{SERVER_PORT} | Matches the Pattern | 444
Server Variables
Name | Value | Replace
SERVER_PORT | 443 | True
Action
Action type:
None
(checked) Stop processing of subsequent requests