0

I am using this, but I have some hard to solve problems.

This is part of my code:

 <rewrite url="/Dictionary/(.+)/(.+)" to="~/Dictionary.aspx?page=$2&amp;&amp;word=$1"/>
 <rewrite url="/Dictionary" to="~/Dictionary.aspx"/>    

When I type links like mywebsite.com/Dictionary/cat/4 the site loads only mywebsite.com/Dictionary.

Kris van der Mast
  • 16,343
  • 8
  • 39
  • 61
Ivelin
  • 45
  • 1
  • 5

3 Answers3

1

Just a guess. Your second condition matches everything starting with /Dictionary. You probably want this

/Dictionary/?$
Jürgen Steinblock
  • 30,746
  • 24
  • 119
  • 189
0

Just a suggestion but you can also try out IIS Url Rewrite 2 instead.

Kris van der Mast
  • 16,343
  • 8
  • 39
  • 61
0

URL Rewrite 2 is a good option like XII said, comes with an user interface.

Regarding the regex, it would be more efficient for the regex engine to avoid backtracking; use the following expression instead:

"/Dictionary/([^/]+)/([^/]+)"

aracntido
  • 253
  • 3
  • 6