URL Rewrite

May 2, 2014 at 7:01 AM
Hi,

I want to change my url in news module from

http://dnn721/Custom/ArtMID/483/ArticleID/2/News.aspx

to

http://dnn721/Custom/News.aspx

Is this possible to do.If yes, then what pattern & action i have to use.


Thanks in advance,
Coordinator
May 2, 2014 at 7:44 AM
Hi,

No, with custom rewrite rules rules, you have to leave the id in the url.
You can only rewrite to for exemple :
http://dnn721/Custom/483-2-News.aspx

Custom rewrite rule :

Parameters : ArtMID={artmid}&ArticleID={articleid}
Url : {artmid}-{articleid}-[pagename].aspx
Page : select the page custom

If you don't want the numbers in the url, you have to make a provider.

Regards,
Sacha
May 2, 2014 at 9:02 AM
Hi,

Thanks for reply.

I am writing rule like :

<rewrite>
        <rules>
            <rule name="Test URL">
                <match url="^Custom/ArtMID/([0-9]+)/ArticleID/([0-9]+)/([_0-9a-z-]+)" />
                <action type="Rewrite" url="custom.aspx?id={R:2}&title={R:3}" />
            </rule>
        </rules>
    </rewrite>
in web.config but its not working.

Please help
Coordinator
May 2, 2014 at 10:38 AM
Hi,

This IIS rewrite rules which nothing to do with the openurl rewriter.

I don't try to use this.

The custom rewrite rules that i talk about have to be created from the Open UrlRewriter admin module, stored rules.

Regards,
Sacha