0
votes

I have a problem using + (plus add) character in iis url rewrite module.

I need to rewrite:

http://www.example.com/search/test1+test2

in

http://www.example.com/search/?q=test1+test2

Url rewrite module basic solution doesn't work and throw a 404 error:

Pattern: ^search/([^/]+)/?$

Rewrite URL: search/?q={R:1}

=============================

I try adding another parameter but I throw a 404 error again:

Pattern: ^search/([^/]+)\+([^/]+)/?$

Rewrite URL: search/?q={R:1}+{R:2}

=============================

This alternative solution for example works:

Pattern: ^search/([^/]+)-([^/]+)/?$

Rewrite URL: search/?q={R:1}+{R:2}

What's the problem?

Thanks in advance

1

1 Answers

1
votes

I think you dont need the ^ in the beginning

Pattern: search/([^/]+)/?$

Rewrite URL: search/?q={R:1}