Products » Support Forums 

Support Forums

HomeHomeDotNetNuke Modu...DotNetNuke Modu...Url MasterUrl Masteruse RegEx to trim urls even moreuse RegEx to trim urls even more
Previous
 
Next
New Post
7/4/2009 8:17 PM
 

I've looked through the forums and saw you mention "undocumented" details on how to use RegEx to achieve what Tom Traak has with his blog and the use of Ventrian News Articles. I would like to do the same thing but I need a reference for where to start.

If you could please provide this documentation and/or a quick sample/guide on how to do it, I'd greatly appreciate it.

Thank you,

Jon

 
New Post
7/4/2009 8:25 PM
 

Figures, 10 seconds after I post I found this file "Custom Rewriting and Redirects for Parameters.htm" in your instructions download. I'll review this and see if I still need any assistance.

Jon

 
New Post
7/6/2009 11:40 PM
 

It seems I do need a little assistance with the ParamaterReWrite portion.

I was able to figure out the ParamaterReplace I believe and was able to get it to create the URL that I want. But since I removed the variable name from the querystring the module no longer can find it. This I believe is the purpose of ParamaterReWrite if I understand correctly.

I'm not sure I fully understand the intentions ParamaterReWrite and need a little more explaination.

To give an example of what I'm trying to accomplish:

Before: http://localhost/site/Blog/ItemId/6/Name-of-page.aspx

After: http://localhost/site/Blog/6/Name-of-page.aspx

Thank you,

Jon

 
New Post
7/7/2009 12:18 AM
 

I guess I just have to post and the answers will come to me.

I figured it out and and here is is the result.

<?xml version="1.0"?>
<friendlyUrlProvider>
    <parameterRewritesSection>
        <parameterRewrite name="Add ItemId back into URL"
                        tabNames="Home"
                        lookFor="(?&lt;!tabid)(?&lt;!ItemId)(?:/|^)(?&lt;artid&gt;\d+)/(?&lt;artname&gt;[^&amp;][\w\d-]+)" 
                        rewriteTo="ItemId=${artid}&amp;${artname}" />
    </parameterRewritesSection>
    <parameterRedirectsSection>
    </parameterRedirectsSection>  
  <parameterReplaceSection>
<parameterReplace name="Remove ItemId from URL"
                        tabNames="Home"
                        lookFor="(?:/|^)(?&lt;prefix&gt;ItemId/)(?&lt;artid&gt;\d+)(?:(?&lt;artname&gt;/[\w\d-]+)|$)"
                        replaceWith="/${artid}${artname}" />
  </parameterReplaceSection>
</friendlyUrlProvider>

 
Previous
 
Next
HomeHomeDotNetNuke Modu...DotNetNuke Modu...Url MasterUrl Masteruse RegEx to trim urls even moreuse RegEx to trim urls even more


Support Guidelines.. Please read before posting

To get support on iFinity products and services, please search the forums for the the answer to the problem you are seeking. If you cannot find a solution, post a question in the relevant forum.   Ensure that you specify the relevant versions of the problem, and the actual error message or a detailed description of the problem.    You will need to register with this site to post on the forum.  If you have a Microsoft Live (Hotmail/Passport) account you can use that.  If you have a Open Id account you can use that.  If you neither of these, you will need to register a user Id and password.

Please note : If you are posting a new thread for the Url Master module, please include the following information where applicable:

- Url Master version

- DotNetNuke version

- Example Url where possible

- If there is an error, please post the full error text and/or stack trace (from the DotNetNuke event log).