Find a windows web host asp net multiple domains




















Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 8 years, 4 months ago. Active 8 years, 4 months ago. Viewed 3k times. I know that following is okay for host entry: Yes, but have you tried it? Did something not work?

I tried it, but it did not work for me on subdomain. That seemed helpful, but I wonder if I am missing something. Because my host file entry is done as the referenced comment says. The subdomain I am trying to visit is on https , where as the domain i am moving from is on http. May be it was because of something related to SSL? I got my answer, see the answer I posted. Thanks, GeoffreyG. Hi GeoffreyG. What you described is what the rule is supposed to do.

Some options for troubleshooting are: Test locally on the server to get a detailed error message, or temporarily set your errors to detailed. The error should tell you what location it attempts to use. This will tell you which URL Rewrite rules, if any, are catching. You can temporarily try a 'break test'. Edit your rule to sent a custom error, like If you get a error then the rule worked. If you don't, then the rule didn't catch. This will help you narrow down whether the error is related to the URL and conditions or the action.

I'm pleased to hear that you were able to troubleshoot that to resolution. IIS 7's distributed config is certainly nice, but it can be easy to miss conflicting rules. It's under the "Url Rewrite" icon. Probably the best way to work through this is to post your existing rule in the iis. There's great support over there in an interactive forum I reply occasionally there too.

Solved, I had to create a new web. Hi aay, Do you want to keep it hidden but still have it available? If so, that's difficult and would need to be done in code by replacing it with session information or POST data. If you simply why to strip the querystring, you can create a rule with. This is the exact fact i was finding for years. Can anyone guess the reason? I will give a small clue. It is Windows 7 and IIS.

You guys think the rest. Anyway thanks a lot and wish you good luck Hi Scott, Have just installed MS Rewrite to a newly delegated version of our website installed to www. Hi Mark. That looks good to me. Does it work for you? Also, if you only have one site on your server, you can just update the root folder for the site and point it directly to the CarNet folder.

You don't even need to use URL Rewrite. URL Rewrite can help with multiple domains on a single site, but it's generally only necessary if you are on a shared host or you have some other reason why you can't create another site. Hi Scott, Thank you for the prompt response.

No, unfortunately and I am flumoxed. My developers have ended up just redirecting the page and I hate that. It has messed with a bunch of hard coded urls in various places And there will be at least one, maybe two other sites. I forawarded your sample syntax and my interpretation, as copied above and they tell me it didn't work. So when you say "just update the root folder for the site and point it directly to the CarNet folder. Mark J. Hi Mark, Each situation is different so I'll speak generally, but if you explain your situation further I can be more specific.

If you manage your own server and it's not on a shared infrastructure then you can rely on multiple sites and host headers instead.

The solution in this blog post is most useful in a shared hosting situation where you only have 1 website but you want to host multiple domain names with multiple sites.

Week 5 talks about the different IIS bindings. That would be the better solution if you have access to the whole server. Thank you. We have dedicated "enterprie" VM servers running windows server I'll check your article, thanks again for responding.

Hi, Scott Thanks for the very informative post. I think I'm almost there, but I'm running into an issue. I have multiple domain names pointing to the same site not a subdirectory of the site. I just want to take requests to one of the domain names lets call it site1. This way, I can display a different home page when site1. I tried to adapt the instructions above and in the comments, but still, whenever I go to site1. Any ideas? Thanks, Daniel.

Everything else looks like it should work. You can escape your. Hi DanielM, You have a. That will cause an issue. However, you're going to run into a loop with that rule because it will keep redirecting.

What you can do is set the match url to which means that it will only process the rule if it's exactly nothing. Alternately you can use a rewrite instead of a redirect. The rule should be something like this untested. It may not be pretty, but I'm self-taught Redirect "www. Hi DanielM, Sorry for the delay while on vacation However, thanks for the follow-up reply. That looks like a good workaround. Thanks for the excellent blog.

I have two websites pointing to same Application in IIS. The difference is my www. When I do the url routing on second site my URL is changing to www. How would I do this? What you may need to do is setup 2 route mappings per URL. One is for Html. RouteLink, and another is for the incoming request. For example: routes. Then you would reference the link with Html. RouteLink "Home", "HomeLink". Hi, my requirements are: host normal site if someone access it using www.

So when someone access it like www. How to configure it? Hi Krunal, What you described is exactly what this article covers. It accomplishes all of your requirements. If you go through the post above, it shows the step by step instructions on how to achieve this. If you've completed the steps and it still doesn't work, let me know which part doesn't work and I'll try to help.

Hy all Can you tell me how to rewrite page. Please Help me to Do this Hi newyearnt, what issue do you have? Basically that rule will take something. If that's your intention, the rule looks good. Hy I want to rewrite url in asp. Hy OWScott. Hi Jaypalsinh, The trick is with the domain name.

What you can do is add an entry to your hosts file for testing. Create jay. Or just jay. The IP should be That will give you a nice domain name to test with. It doesn't matter yet if it's the right thing.

As long as it calls up something then you know that the domain name points to your server and IIS handles it. Then start working on your URL Rewrite rules. Hello, I hope you still read these comments. Anyway this is a great article! Hi Antti, Yep, I still read the comments. Hey Scott, Thanks for this post. It has been useful in reducing a major change in our application however we're currently experiencing problems with RedirectToAction methods all across our MVC 3 site.

Basically, we've got a web application set up on IIS 7. We are using your technique of re-writing to forward all requests to the website to a web application that is in 1 folder.

However, we are noticing that when the actions have got RedirectToAction it is trying to request www. An example is: when the user tries to login, we call RedirectToAction "Index", "Admin" after authentication. However, the actual thing doesn't work. Any paths created by the server need to either be specifically handled on the server or rewritten on the way out.

Thanks for that Scott. I have since noticed that the problem isn't with the MVC routes. I wanted to check if the server side code for domain. I have noticed that the request doesn't reach there at all. I used fiddler to generate a post to that url with appropriate headers and can see that the desired result is achieved.

However, when posting from the browser, the server-side post action for logon just doesn't get called! Any ideas why? Thanks again for taking the time to reply. Hi Amyth, It sounds like two things then. So the login issue must be a different issue. Does domain. Does it work if you disable the rule? I would start by pulling URL Rewrite out of the picture and making sure that your login works. If it does, then we can focus on the rules. Otherwise at least you know that URL Rewrite isn't the cause.

I think the re-write is fine. We've been able to make login work by changing the following: From: Html. Post To Html. BeginForm I would love to know what the difference is. I now am fairly confident that the re-write wasn't causing any problems. The word in the team is that the routing was at fault. We've got so many custom routes that nobody knows what is happening.

I wish I could tell you what went wrong and how we resolved it. After our release we are going to investigate it further! Following you on twitter, will let you know.

Hi Amyth, Sounds like you're narrowing it down. That's the key thing. I'm curious to hear what you figure. BeginForm works, I wanted to know why it doesn't work when you put attributes on it say a 'name' or 'id'. Btw the application is located inside a subdirectory. Hi Vaibhav, It's the back reference to the domain that would cause the issue. If you use IIS Manager and then edit the condition and run the test app, you can see what the back references will be. There are a couple other little things to tweak too.

In your example, that's for something. For abc. Hi Rey, It's not overly straight forward to add the Id. The way to do it is to use the httpAttributes. The problem is that there isn't an overload that just takes the httpAttributes so you'll need a longer overload.

Here's an example see the approved answer. This won't work in IIS6. Hi Am not familiar with URL Rewrites att all and wonder if you just can point me in the right direction. Hi Ahmed, That's a fun one.

The trick is that you need to split the first part of the folder from the rest. You probably also want to exclude some files or folders. You can add more folders to this list. Hi, is this better then ASP.

Hi nazo. It works for the current application and doesn't generally cross application boundaries. URL Rewrite is good for global settings on a domain like redirecting to www or hosting a site from a subfolder. It's also a good solution for after-the-fact type situations where the admin or developer wants to handle some URLs. It also has a good rewrite mapping solution if you move a site from an old location to a new location. It really depends on which you are comfortable with.

Thanks for the help, but it that did not solve the problem. I just got my original site up and running under the old directory and I'm exhausted. The NS hosting service I have is a medium trust shared hosting package that I started using last summer to cut down on bandwidth costs. The most frustrating thing about it is how limited my options are for dealing with problems and my only reason for using it is simply becasue bandwidth on my VPN at Negox taxes me if I go over.

Other problems related to NS have included not being able to use Crystal Reports or SSRS due to permission and having to use their contact us email forms despite having built a perfectly good one myself. It gives me a folder that works fine for assigning one domain and sub domains. I dont have access to IIS directly, so in order to fix the problem and use their service I will have to add a fresh web. I tried messing around with a location tag in a fresh web.

I only host the file system on that thing and what I would really like would be a better service with similar bandwidth rates without all these restrictions or at least an interface like Hsphere, but I hate to limp away from a problem that I could easily encounter elsewhere.

The sites I need to add are not finished yet, so I'm not in a huge hurry, but I am going to need to solve this or move on. It just occurred to me that I could probably build the new sites in a sub directory, I want them to thier own apps. The content you requested has been removed.



0コメント

  • 1000 / 1000