url-rewrite-module

IIS 8.5 How to set up reverse proxy with URL Rewrite

孤街浪徒 提交于 2019-12-13 03:43:06
问题 I am trying to get one (public) server A to act as a reverse proxy for another (private) server B. Server B is visible to server A. i.e. if I'm on server A and I type in a browser: https://serverb.us/folder/application I see the application. I want it so that if the user types: https://servera.us/folder/application he sees the web application that is on server B. Is that possible? I have tried adding a rewrite rule in IIS Manager by doing URL Rewrite > Add Rule(s) > Reverse Proxy > I changed

IIS URL Rewrite module: Url.Content() does not resolve CSS/Image path properly

谁说我不能喝 提交于 2019-12-12 13:09:15
问题 I have a standard MVC3 project with layout page etc. Now I need to make pretty URLs. I started playing with URL rewrite module. I'm trying to translate http://localhost/Photographer/Pablo into http://localhost/category-about.aspx?displayName=Pablo , and here is my rewrite rule (very simple!): <system.webServer> <rewrite> <rules> <rule name="about" patternSyntax="Wildcard"> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add matchType="IsDirectory" negate=

Rewrite rule error: HTTP Error 500.50 - URL Rewrite Module Error. The expression “https://abc.com/{R:1}” cannot be expanded

一个人想着一个人 提交于 2019-12-12 08:20:02
问题 Whenever someone makes request over HTTP protocol I rewrite the url to make it HTTPS. This is the code in web.config: <rule name="Imported Rule 1-1" enabled="true" stopProcessing="true"> <match url="^(?!https://).*" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{SERVER_PORT}" pattern="80" ignoreCase="false" /> </conditions> <action type="Rewrite" url="https://abc.com/{R:1}" /> </rule> However when I browse on http:// I get IIS error HTTP Error 500.50 - URL Rewrite

iis7 url rewrite for webforms aspx to mvc page

不打扰是莪最后的温柔 提交于 2019-12-11 19:27:15
问题 I have had a website with /contact.aspx which gets a succesful redirect to /contact But I want to redirect my old /content.aspx?contentid=123 to /about/123 Here is my redirect XML part in my web.config: <rewrite> <rules> <rule name="contact" patternSyntax="Wildcard" stopProcessing="true"> <match url="contact.aspx" /> <action type="Redirect" url="Contact" redirectType="Found" /> </rule> <rule name="Content" patternSyntax="Wildcard" stopProcessing="true"> <match url="content.aspx?contentID=*" /

IIS URL Rewrite based on logged in user

余生长醉 提交于 2019-12-11 13:56:21
问题 I have a scenario whereby I want to route http requests from authenticated users to specific websites hidden behind a reverse proxy. The decision of which site to route too is based on the specific user. For example, user 'Mary' may be routed to site "b"; user 'John' may be routed to site "e". I am hosting the sites on IIS and am using ARR as my reverse proxy. I'm trying to figure out the best way to use URL Rewrite to make the routing decision. One idea I had was to build a custom URL

URL Rewrite to change querystring case

匆匆过客 提交于 2019-12-11 11:39:40
问题 I am looking to setup a URL rewrite rule in my web.config that will modify the following URL: /detail.aspx?aID=164&mode=t To (see case of aid ): /detail.aspx?aid=164&mode=t Please can anyone assist me with this? The only other thing to mention here is that the rule should still work if there is no mode parameter at the end and irrespective of what order the aid parameter appears in the querystring. EDIT 1 I found this guide which rewrites the whole URL to lowercase. This would work for me

307 redirect rule with Microsoft Rewrite Module 2.0

荒凉一梦 提交于 2019-12-11 08:10:07
问题 Is it possible to make a 307 redirect rule in web.config with Microsoft Rewrite Module 2.0 for IIS 7? The goal is to redirect some post form requests to another path within the same domain. 回答1: Set redirectType attribute of action tag to "Temporary" Eg. <rewrite> <rules> <rule name="RedirectRule" stopProcessing="true"> <match url="(.*)" ignoreCase="true" /> <action type="Redirect" url="http://www.newdomain.com/{R:1}" redirectType="Temporary" /> <conditions> <add input="{HTTP_HOST}" pattern=

IIS URL Rewrite rule - How can I remove some segments?

自古美人都是妖i 提交于 2019-12-11 05:54:07
问题 I have read the article Creating Rewrite Rules for the URL Rewrite Module at iis.net and I would like to remove some segments from my urls. for example, from: /article/archive/2289/01/articleid/191/reftab/36/word1 word2 word3 to: /article/articleid/191/word1-word2-word3 I have changed my web.config file with this but I don't be able to solve my issue: <rewrite> <rules> <rule name="Remove segments"> <match url="^article/archive/2289/01/([0-9]+)/([_0-9a-z-]+)" /> <action type="Rewrite" url=

URL-rewriting in web.config not working for Slim PHP API in subdirectory

烈酒焚心 提交于 2019-12-11 03:55:10
问题 I developed the backend application using the WAMP stack (Windows + Apache + MySQL + PHP) and SlimPHP micro framework. It is working perfectly with WAMP but now I have to make it work in a server that is using IIS v7.5 and I'm getting an HTTP 404 error. The frontend is an AngularJS application located in the root directory (no problem here) that uses the data obtained from the SlimPHP API located in the /api/v0 subdirectory. Here is the structure of my web-app: Project |--index.html |--styles

IIS7 Application Request Routing HTTPS

只愿长相守 提交于 2019-12-11 03:13:59
问题 I have a reverse proxy that routes traffic to my app server.. I have login feature on my public website that is served through HTTPS. The SSL certificates are installed in the reverse proxy server only. My app server doesn't have SSL certificate. SSL Offloading is enabled in the reverse proxy server. This works perfectly so far, I can access the login page and the member area via HTTPS. But, I notice that my session cookie is not secure... I'm using .NET Membership Provider for authentication