0
votes

Using the URL Rewrite module, I've got a rule setup that is defined as:

Matches the pattern
Regular Expressions
Pattern: /support/viewmessages.aspx
Ignore Case: true
Action Type: Redirect

Redirect URL: http://newdomain/support/viewmessages.aspx
Append Query String: true
Redirect Type: 301

This sounds to me like it should redirect any of the URLs formated like:
http://olddomain/support/viewmessages.aspx?forum=20&topic=75942&ForumName=General%20Discussion
To be:
http://newdomain/support/viewmessages.aspx?forum=20&topic=75942&ForumName=General%20Discussion

However, nothing seems to be happening. I'm getting my 404 on the old domain, and it's not going to the 404 with the query string appended.

Here's the code that IIS generated in my web.config:

<rule name="Forum Posts" patternSyntax="ECMAScript" stopProcessing="true">
    <match url="/support/viewmessages.aspx" />
    <action type="Redirect" url="http://newdomain/support/viewmessages.aspx" appendQueryString="true" />
</rule>

Any help would be appreciated.

1
Sounds to me like this is more along the lines of a serverfault question. Where is the "programming"?Jimmy D

1 Answers

1
votes

Attempt 1: Did you try the pattern without the forward slash? The other thought I'd have is whether there is something special to be done about the slash and dot since they may be seen as special characters within regular expressions.


Point 2: You do recognize that the dot is a special character in regular expressions, right? You may have to find a way to escape it so that the url likes like "/support/viewmatches\.aspx"