tags:

views:

2694

answers:

7

I would like to implement a URL rewrriter for DotNetNuke. Have questions as to whether this is a good or possible approach and any suggestions other developers may have.

Can I add a dynamic or static route for URL rewriter from the 'Pages'-> 'Add Page' section?

Let's say I'm creating a page called 'Events' underneath the 'Activities' menu item.

Can I write some custom code in DotNetNuke that will add a prompt on the add page screen that assumes I will want a static or dynamic route added for - site.com/Activities/Events Or if I name the page 'Event Calendar' then it would suggest 'site.com/Activities/Event-Calendar'?

I would like any feedback or suggestions on how I would accomplish this! Thank you.

+2  A: 

Check this out - details here:

http://www.ifinity.com.au/Blog/Technical_Blog/EntryId/19/Rewriting-the-DotNetNuke-Url-Rewriter-Module/

Also, take a look at the existing FriendlyUrl module that's already included in DNN.

If you want to do this on the stock pages, you'll need to crack open the source for it, or write a module that does this independently.

routeNpingme
+1  A: 

Another suggestion is Page Blaster, if you are not wishing write your own code. Works well for the sites l use it on.

BobF
+2  A: 

If you're using DotNetNuke 4.8 or greater, you just need to enable Human Friendly Urls through the Web.Config.

To enable human friendly urls, replace:

<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" />

with:

<add name="DNNFriendlyUrl" type="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules" includePageName="true" regexMatch="[^a-zA-Z0-9 _-]" urlFormat="HumanFriendly" />

Additional Detail: Enable Human Friendly Urls in DotNetNuke

EfficionDave
A: 

HI I tried this but still my site displays URL in friendly format but not in Human friendly format??

CAn you please help?

This really should be posted as its own question.
Tim S. Van Haren
+1  A: 

This is exactly what I want.

DNN defaultly put tab name into the URL this made

big problem when using asian language for tab name.

cuongdv
+1  A: 

To answer your question directly : yes, you can add some code to the DNN Page Settings page. However, you'll be modifying the core code and thus won't be able to easily upgrade your installation when the next DNN release is made.

A lot of people come to DNN and want to write a new Url Rewriter. The problem is not the rewriting : it's getting the DNN framework to generate the correct urls where you would like them - in the menus, in generated links within modules. To really change the rewriting scheme you need to replace/augment the Url Rewriting function, the friendly url generation function, and provide some sort of redirect capability in order to tie old and new Urls together.

Bruce Chapman
+1  A: 

tttthaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanx alot

qqw