lapucca
asked on
Can't get URL Redirect to work for directing http to https
Hi,
I've followed these 2 url instructions and still when I use http it doesn't get redirected. Instead I would get HTTP 404 error that the resource is not found. Attached is the web.config from the web server. I tried both "pattern="off" and pattern="^OFF$" and they both didn't work.
Also, in IIS, SSL Setting, I unchecked the "Required SSL".
I also removed this line form the web.config file, " "<httpRedirect enabled="false" destination="" />"
But that didn't help solve the problem either. What is this line for? It was right before the Rewrite Rules section.
I'm attaching the Rules from my web.config file here.
Thank you.
HTTP.txt
I've followed these 2 url instructions and still when I use http it doesn't get redirected. Instead I would get HTTP 404 error that the resource is not found. Attached is the web.config from the web server. I tried both "pattern="off" and pattern="^OFF$" and they both didn't work.
Also, in IIS, SSL Setting, I unchecked the "Required SSL".
I also removed this line form the web.config file, " "<httpRedirect enabled="false" destination="" />"
But that didn't help solve the problem either. What is this line for? It was right before the Rewrite Rules section.
I'm attaching the Rules from my web.config file here.
Thank you.
HTTP.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It_Saige, thank you for that correction. I removed it and it still doesn't work. I then copy and past in your code and still the same http 404 error. Both times I restarted the website in IIS just to make sure. It's very odd.
Hi Mohammed, one of the 2 url that I followed the instruction is the same as what you listed and this one, https://www.sslshopper.com/iis7-redirect-http-to-https.html
The only difference in the end result code in web.config is at the pattern="off" or pattern="^OFF$f" I tried both and neither fixed my http404 error. Below is the full error I got:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /apps/xxxx/AppDirectory.as px
Hi Mohammed, one of the 2 url that I followed the instruction is the same as what you listed and this one, https://www.sslshopper.com/iis7-redirect-http-to-https.html
The only difference in the end result code in web.config is at the pattern="off" or pattern="^OFF$f" I tried both and neither fixed my http404 error. Below is the full error I got:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /apps/xxxx/AppDirectory.as
Could you post a copy of your web.config
ASKER
You need to reupload the Web.config using a different extension.
-saige-
-saige-
ASKER
Right, sorry about it. Here it is.
Web.txt
Web.txt
ASKER
ASKER
I think the SSL installed is the problem. Thank you.
http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/