Hello, In my discountASP site I use IIS Manager to rewrite URLs to point to subfolders, i.e. I enable root/subFolder1 as an application and use IIS to rewrite the request: mySite.com --> mySite.com/subfolder1 I believe I read somewhere on this forum that EL doesn't allow you to connect with IIS Manager, but does it allow you to do the same thing by using web.config? This blog describes it, http://weblogs.asp.net/owscott/iis-url-rewrite-hosting-multiple-domains-under-one-site I did a test myself (below) which isn't working, after a couple hours trouble shooting I'm not certain if I have a typo or if EL's architecture is preventing it. <rewrite> <rules> <rulename="subFolder1"stopProcessing="true"> <matchurl=".*"/> <conditions> <addinput="{HTTP_HOST}"pattern="^(www.)?myEverLeapAltURL.el-alt.com"/> <!--<addinput="{PATH_INFO}"pattern="^/subFolder1/"negate="true"/> --> </conditions> <actiontype="Rewrite"url="\subFolder1\{R:0}"/> </rule> </rules> </rewrite>
I tested the rewrite as specified in the blog, and it works. Are you adding the rewrites to the web.config in the root folder?
Aristotle, That was it. In my discountASP.net account I had it in the root, but I was trying to put it in the subfolder here, forgot that it wouldn't be hit there. Thank You! This was my last 'gotta have it' feature, definitely going to move over to EverLeap. Thanks again!
I have a similar problem. In my case the web.config works fine for all http requests but is not working as expected https requests. i.e. for all http calls it goes to domain.mydomain.com/abc.aspx but if it is a https then it shows https://mydomain.com/demo/abc.aspx in the address bar. How can I get it to redirect it to https://demo.mydomain.com/abc.aspx? Here's my web.config <rewrite> <rules> <rule name="demo.mydomain.com" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^demo.mydomain.com$" /> <add input="{PATH_INFO}" pattern="^/demo/" negate="true" /> </conditions> <action type="Rewrite" url="\demo\{R:0}" /> </rule> </rules> </rewrite>
are you using SNI SSL or unique IP ssl? What error are you getting? or it just doesn't redirect properly.
I am not sure. How can I check that? I have a discountasp.net hosting. It redirects but instead of https://demo.mydomain.com/abc.aspx it is showing up https://www.mydomain.com/demo/abc.aspx (which is the actual path instead of the sub domain)
Do you want a redirect or a rewrite? They are two different things. Your example is a rewrite and not a redirect. The rewrite rule that you have will do the following: If the user goes to http or https://demo.mydomain.com/abc.aspx, it will show the page at /demo/abc.aspx. So your links to the pages must have demo.mydomain.com in the first place. It does not do redirects from www.mydomain.com to demo.mydomain.com.
I need a rewrite only and not redirect. My links are not hardcoded but relative. Everything works fine for the http links but for the https links it creates a problem. Please take a look at http://demo.basebypros.com/ to see what I mean. If you click on any of the links, most of the links will work as expected but if you click on any of the secure links like login or sign up, you'll see what I mean. I wanted to set it up as a demo and everything is fine if I don't use the secure feature using web.config i.e. by setting <add key="RequireSSL" value="false" />. So, my problem is solved for now but it'll be good to know what is causing this redirection.
It's doesn't look like an issue with the rewrite rule. The application is probably doing the redirects when it's HTTPS. You'll have to go through it's code to pinpoint where it's doing the redirect.