For our customer we want to show the current status of a MVC project. Therefore he goes to our server (Apache 2) something like
http://domainname.de/projectname. He must then authenticate and will be redirected via a reverse proxy to our internal IIS 6 server (somewhat like
http://internalserver/projectname/Home. But for the customer outside it looks like
http://domainname.de/projectname/Home. This seems to work for the first page and all manually hardcoded links, Images, Stylesheets etc. in the project. The Problem occurs whenever we create urls with "~" for
the base directory. Then the created link outside will not look as
http://domainame.de/projectname/About but like
http://domainame.de/About.
Can anybody help why this happens and what to do to make it work without changing all links in the code? I assume this is not an apache problem, since we have ruby on rails apps with the same apache configuration and the links get correctly generated in
rails.
I've solved the problem by adding an additional module to the apache webserver which rewrites all URL's in the HTML-response. I still have some strange behaviour since (only) some of the css-styles are ignored but it works at least.
einhandsegle...
Member
63 Points
22 Posts
ASP.net MVC Website on IIS and a Apache Reverse Proxy
Nov 26, 2008 07:11 AM|LINK
Hi,
For our customer we want to show the current status of a MVC project. Therefore he goes to our server (Apache 2) something like http://domainname.de/projectname. He must then authenticate and will be redirected via a reverse proxy to our internal IIS 6 server (somewhat like http://internalserver/projectname/Home. But for the customer outside it looks like http://domainname.de/projectname/Home. This seems to work for the first page and all manually hardcoded links, Images, Stylesheets etc. in the project. The Problem occurs whenever we create urls with "~" for the base directory. Then the created link outside will not look as http://domainame.de/projectname/About but like http://domainame.de/About.
Can anybody help why this happens and what to do to make it work without changing all links in the code? I assume this is not an apache problem, since we have ruby on rails apps with the same apache configuration and the links get correctly generated in rails.
Michael
einhandsegle...
Member
63 Points
22 Posts
Re: ASP.net MVC Website on IIS and a Apache Reverse Proxy
Nov 27, 2008 01:37 PM|LINK
Hi,
I've solved the problem by adding an additional module to the apache webserver which rewrites all URL's in the HTML-response. I still have some strange behaviour since (only) some of the css-styles are ignored but it works at least.
Michael
einhandsegle...
Member
63 Points
22 Posts
Re: ASP.net MVC Website on IIS and a Apache Reverse Proxy
Nov 27, 2008 02:07 PM|LINK
Hi,
The CSS problems are also solved, they are caused because the apache module thought it was agood idea to remove the doctype. Really Cool.
Michael