301 Redirect with symbol in URL

Khoa Nguyen asked on September 11, 2018 05:13

I was trying to do with URL re-directing using web.config but I had no luck getting it to work.

What I'm trying to do is re-direct /aricles/content/category/34..?layout=blog&start=10 to home page /

my rule in web.config

<rule name="MyRule" stopProcessing="true">
<match url="^aricles/content/category/(.+)" />
<action type="Redirect" url="/" appendQueryString="true" />

I had tried many cases but it didn't match:

<match url="^aricles/content/category/(.*)" />

<match url="^aricles/content/category/34\.\." />

<match url="^aricles/content/category/34%2E%2E(.*)" />

It only working when have a any letter after ..

example when i typed /aricles/content/category/34..a -> redirect to home

Anyone can help me?

   Please, sign in to be able to submit a new answer.