开发者

Rewrite URLs for DNN

I hav开发者_Go百科e a site and already trying to do a little url rewritting but want to know if there is a solution to make it better

my current state urls look like this

http://snit.us/Home/tabid/314/CN/1/RE/23/United_States_Missouri.aspx

I want to change them to something more ordered so in my new scheme i want to do this

http://snit.us/Home/United_States/Missouri/default.aspx

obviously the point is that if i remove missouri from the new url it would find all United_States - etc etc etc

even better would be to have http://snit.us/Home/United_States/Missouri so its even less cluttered


I think your best bet would be to implement the free iFinity URL Rewriter for DotNetNuke. At the very least, you should be able to achieve the following:

http://snit.us/Home/CN/1/RE/23/United_States_Missouri

If you're using IIS 6, you'll want to enable extensionless URLs in IIS. If you're using IIS 7, you should not need to make any changes.

To set it up, you'll just need to add the DLL that iFinity provides to your site's bin directory and then follow the instructions that came with the download for configuring your web.config (make sure to make a backup copy of your web.config for safety and convenience).

Here is an example configuration that we use on dnnGallery.net:

<add name="Ifinity.FriendlyUrl" type="iFinity.DNN.Modules.FriendlyUrl.DNNFriendlyUrlProvider, iFinity.FriendlyUrlProvider" includePageName="true" regexMatch="[^\+a-zA-Z0-9 _-]" urlFormat="HumanFriendly" redirectUnfriendly="true" doNotRewriteRegex="(\.axd)|(/DesktopModules/)" doNotRedirect="SearchResults;" doNotRedirectRegex="[.]*(/logoff.aspx)" pageExtensionUsage="never" parameterHandling="ordered" checkForDupUrls="true" forceLowerCase="true" redirectWrongCase="false" replaceSpaceWith="_" redirectDefaultPath="true" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜