在DNN中,有三类URL,分别是:"default", "Friendly"和"Human Friendly"。
示例如下:
default: dotnetnuke.com/default.aspx?tabid=57
friendly: dotnetnuke.com/tabid/57/Default.aspx
human friendly dotnetnuke.com/AwesomePage.aspx
对与friendly url,大家一定很熟悉了,到这里可以打开friendly url:
Host->Host Settings
Friendly Url Settins这一节,勾选
但对于"Human Friendly"大家可能还不知道如何设置,其实,如果你使用的是DNN自带的Friendly Url Provider,你到web.config文件中在'DNNFriendlyUrl' 节增加一个urlformat="HumanFriendly" 参数就可以实现这个功能了。
就是这里:
1
<
friendlyUrl
defaultProvider
="DNNFriendlyUrl"
>
2 < providers >
3 < clear />
4 < add name ="DNNFriendlyUrl"
type ="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules"
includePageName ="true"
regexMatch ="[^a-zA-Z0-9 _-]"
urlformat ="HumanFriendly" />
5 </ providers >
6 </ friendlyUrl >
2 < providers >
3 < clear />
4 < add name ="DNNFriendlyUrl"
type ="DotNetNuke.Services.Url.FriendlyUrl.DNNFriendlyUrlProvider, DotNetNuke.HttpModules"
includePageName ="true"
regexMatch ="[^a-zA-Z0-9 _-]"
urlformat ="HumanFriendly" />
5 </ providers >
6 </ friendlyUrl >