Need help with rewrite or redirect

Mar 28, 2014 at 2:54 AM
We recently released a new version of our website. We replaced the blog 3rd party app we were using with a dotnetnuke module.

Our old blog app used with path for cloud tags:
<domain>/BLOG/?tag=/beer+imports+usa

The new one uses this:
<domain>/blog.aspx?tag=beer+imports+usa

We are currently getting 404s if people use the first link found through a search engine. I've tried to rewrite or redirect this maintaining the tag parameter and can't get it working.

Anyone have any ideas? Either through OpenURLRewriter or through the DotNetNuke Friendly URL Settings Regex matching?

Thanks!
Coordinator
Mar 28, 2014 at 10:35 AM
Hi,

with the standard dnn host rewrite rules (or it's the same with custom open rewriter rules) you have to work with regular expressions.

For you :
from :
/BLOG/?tag=(.*)

to :
http://www.yourdomain.com/blog.aspx?tag=$1

this is for a redirection rule

Reg
Mar 28, 2014 at 10:59 PM
Thanks for the suggestion. I had tried that one.

It doesn't work. It makes the final result this:
<domain>/blog.aspx?tag=/beer+imports+usa

With an extra forward slash after tag=

I tried changing the from to: /BLOG/?tag=/(.*) but that still resulted in the extra forward slash after tag= in the result.

Cheryl
Coordinator
Mar 28, 2014 at 11:47 PM
Hi,

I have check it out.

You are right.
Dnn (and openurlrewriter) don't use the part after "?" in the regular expression.

So what you want to do is not possible in dnn.

You can try to do it with IIS rewrite module.

Regards,
Sacha