Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Replace Portions of the URL? (ie; rename "tabid" to "anotherword")  Replace Portions of the URL? (ie; rename "tabid" to "anotherword")
Previous
 
Next
New Post
2/8/2008 4:30 PM
 

Hello,

Is it possible to globally replace a common part of the URL like "tabid"? I am wondering if there is some way that this could be done with the urlrewriter? I would like to avoid specifying each url, and would rather just swap out the tabid with another word if it is possible.

Thanks,
Jim

 
New Post
2/11/2008 2:51 AM
 

DNN can hide the "tabid" from URL by using HumanFriendlyUrl provider.

For example if you have this kind of url :

http://www.mydomain.com/tabid/174/default.aspx

 

then you can change it to :

http://www.mydomain.com/home.aspx

home.aspx is never exist on the server since it is  just a virtual page based on your tab name. So if you have a tab name (page) Contact then the url is :

http://www.mydomain.com/contact.aspx

Here DNN remove the tabid information using HumanFriendlyUrl technique. Just opened your web.config and locate this tag :

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

Change it to :

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

Save it and refresh your DNN application. Then you will see no tabid is in your urls. Is that what you mean ?

HTH.

 
New Post
2/11/2008 5:45 AM
 

hi Agung. Great man! chege the url is wonderful.

nice. thanks man bye.


sahil

 

 
New Post
3/19/2008 2:50 AM
 

Hi Agung,

i was trying your code as you mentioned about - Hide "tabid" from URL.

and write following code in webconfig file

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

But i got following error,

 


Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized attribute 'requirePermission'.

Source Error:


Line 4: <sectionGroup name="dotnetnuke">
Line 5: <!-- the requirePermission attribute will cause a syntax warning - please ignore - it is required for Medium Trust support-->
Line 6: <section name="data" requirePermission="false" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />
Line 7: <section name="logging" requirePermission="false" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />
Line 8: <section name="scheduling" requirePermission="false" type="DotNetNuke.Framework.Providers.ProviderConfigurationHandler, DotNetNuke" />

Source File: D:\DotNetNuke_Test\web.config    Line: 6


i just added { urlFormat="HumanFriendly" } attribute in the webconifg nothing else.

Could you please tell me what's going wrong!

Bye,

Sahil

 

 
New Post
3/20/2008 9:46 AM
 

This is awesome.

This can also help in a security aspect.   DNN is easily distinguished (i think) by the URL and Favicon.  If another security issue ever came around, a bugger could easily determine which sites are DNN.    Granted, an end user could still find some indicator, but it wouldn't be quite as obvious as the URL.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Replace Portions of the URL? (ie; rename "tabid" to "anotherword")  Replace Portions of the URL? (ie; rename "tabid" to "anotherword")


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out