IIS Configuration. 1 Domain, multiple applications - iis

I'm having a bit of a problem here.
We have 2 urls let me call them http://www.testUrl.com/ and http://www.test-url.com/
This url points to a server using an "A-Record".
In IIS I've appointed these url's through "Advanced Website Identification" to the correct application.
Now we have 2 apps. One application is version one the other is the more advanced application.
Now my boss wants me to link one url to 2 different applications.
So when you surf to http://www.testurl.com/ or http://www.testurl.com you see the latest version but when you surf to http://www.testurl.com/folderinversion1/ you'll see the folder of the first application.
It's a though situation and I don't think there is a solution but I wanted to double check if you can assign 1 url to 2 applications.

Can you not just create a virtual directory called /folderinversion1 in the site for testurl.com pointing at the application root that is currently on the other site?

Related

Asp.net website developed using kentico cms causing "www" prefix issue

We are facing a weird issue specific only on one website even though we are hosting more than 150 websites on same server using Kentico CMS 11.
We have turned on "www" prefix settings from Kentico -> Urls & SEO for all the websites and all these sites are working without any issue.
But there is a specific website on which all the requests are getting redirected to home page if try to access with "www" prefix.
I have tried checking at code level and could not find any issue. If it would be code issue then it should appear for other websites as well.
We are using Azure app service for hosting our application so I have checked in application insight as well and could not get any lead as all the request which are logged for this specific websites are of home page.
Please help me in understanding if I need to see through this issue at some other place. I have checked with Client's IS team and they could not find any DNS settings difference when compared to other websites which are working fine.
Please check the web.config file of this site. It may contain a wrong URL redirect associated with "www" so that probably this redirect just cuts all the path from URL.

Running several web applications from a single domain name on IIS

Supposing I have my main asp.net website hosted at domain.com.
Is it possible to install another website (web app) so that it is accessible via "subfolder": http://www.domain.com/second-app ?
Is there a restriction on what technology the second app can be? Can it be PHP, even though the main site is asp.net?
To make it clearer, as an example:
Main website: http://www.domain.com/
Then I want to install one of the wiki-engines so that it will be accessible like so: http://www.domain.com/wiki
From the technical IIS point of view these 2 will be different websites.
So, is such a setup possible? If so, how? Any web.config settings one should be aware of?
Yes, this is quite common. The second app can be in any language (but since it's IIS it will inherit the "Web.config" settings under the parent app.)
You just have to make sure you install PHP for IIS: https://php.iis.net/
So in IIS to accomplish this.
You will create a site "domain.com"
Right click on that site and click "Add Application"
It's that simple.

Subdomain doesn't show images from root Domain (Drupal)

I have a site up and running using Drupal.I use a web-hosting service, that uses Plesk 12 panel.Recently I decided to add a subdomain for the mobile version of my site.So I created a subdomain inside Plesk, pointed it to www.mydomain.com and named it m.mydomain.com.My desktop site is in httpdocs folder and my mobile version in m.mydomain.com folder.Then I added redirection to my mobile site when a mobile device is detected.
The problem is that m.mydomain.com does not show images because they are uploaded in httpdocs/sites/default/files which is my desktop site.Is there a way to access that folder from my subdomain?I have no access to http config files.Is there a way to do this from .htaccess file of my sub-domain?
*UPDATE
My structure is:
root
-----httpdocs
----------desktop site folder
-----------------desktop site files
----------mobile site folder
-----------------mobile site files
----------images
The best option I can think of is to use the Drupal module Domain Access.
From the module's page:
The Domain Access project is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database.
Using that, you should be able to apply a different theme to the subdomain site than what you are doing with your main domain. You could use JavaScript or the like to redirect people to the subdomain.
The second option is that there is already a module called Mobile Tools that allow you to change theme and other settings for mobile devices. The description for that module page is as follows:
The Mobile Tools module provides Drupal developers with some tools to assist in making adjustments to your site based on the visitor's device.
It was mentioned in this question, "How to redirect users to mobile site". However, I must caution you against using the Mobile Tools module as it is only in development, and the last contribution to it was 3 years ago. (Plus they have a big warning on their module page that says "Do not use on production".)
Either of these modules should be able to get you started in the right direction.
Instead of doing a redirect, I would place the images in a folder accessible to both systems. My understanding is right now you have something similar to...
site1/images
site2
If you move your images folder higher in your folder architecture to the same level as site1 and site2 and you update your Public file system path and Private file system path in the media configuration to be that directory it will resolve your issues. Essentially your folders will end up looking like this.
site1/
site2/
images/

Virtual directory problem in IIS for asp.net web application

My asp.net web application works fine locally and when I deploy it as the default web site on my test server. So for example, when I type http:// 10.10.10.100 it works fine.
I created a virtual directory called "Test" under my "Default Web Site".
When I type http://10.10.10.100/Test it loads correctly to my log-in page, however when I log-in and click on a link it goes back to my log-in page and the url goes back referencing http://10.10.10.100 instead of http://10.10.10.100/Test/Default.aspx, for example.
My goal here is to run my application from the virtual directory and not as the default, but I don't want to change my code to a hard coded path since then it won't work anywhere else.
Any workarounds for this?
You have left a few unanswered questions, but some things to check:
Which links are you using? In other words, are they plain HTML links (<a href=""> links), ASP.NET links (<asp:HyperLink>), LinkButtons (<asp:LinkButton>), etc.?
How are you specifying the URL in those links? ASP.NET has a "shortcut" for root directory of the website if you use the tilde (~) character. So, to link to a page on your site called "MyPage.aspx", you might use "~/MyPage.aspx".

How do you make a CMS and existing asp.net applications live together peacefully in IIS?

Note: I originally posted this on ServerFault, but I haven't gotten any responses at all. Since it looks like I'm on track to get the Tumbleweed badge over there, I figured I would try here also.
Our existing public website consists of a mish-mash of asp.net pages with mostly static content and some real web applications that are set up as virtual directories. We're now looking at installing Umbraco, which requires that you install it at the root of the website.
Since the CMS would be at the root of the website, I'm assuming it's a bad idea to run our existing pages and web applications underneath Umbraco (due to the URL rewriting it performs and inheriting web.config settings, etc.) So how do we make everything co-exist peacefully both while we transition to the CMS and after we're finished?
My only idea so far was to set up the CMS and the applications as separate websites and then use some sort of URL rewriting/reverse proxy to make everything resolve correctly:
* www.example.com would keep resolving to our old homepage
* www.example.com/dept1 would keep resolving to the old dept1 page
* www.example.com/dept2 would resolve to the new dept2 page on the CMS
* www.example.com/app would resolve to an existing web application
We ending up setting up Umbraco as it's own website in IIS and then we bought ISAPI Rewrite so that we could seamlessly pass through CMS content for certain URLs.

Resources