Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

The best choice for your web site host, email hosting, and domain registration.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
WebHostForAsp.net
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Replace Portions of the URL? (ie; rename "tabid" to "anotherword")
Previous Previous
 
Next Next
New Post 2/8/2008 12:30 PM
User is offline James Lesinski
12 posts
10th Ranked


Replace Portions of the URL? (ie; rename "tabid" to "anotherword")  

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/10/2008 10:51 PM
User is offline Agung Riyadi
100 posts
9th Ranked


Re: Replace Portions of the URL? (ie; rename "tabid" to "anotherword")  

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 1:45 AM
User is offline ~: Sahilmohammad :~
56 posts
10th Ranked


Re: Replace Portions of the URL? (ie; rename "tabid" to "anotherword")  

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

nice. thanks man bye.


sahil

 

 
New Post 3/18/2008 11:50 PM
User is offline ~: Sahilmohammad :~
56 posts
10th Ranked


Re: Replace Portions of the URL? (ie; rename "tabid" to "anotherword")  

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 6:46 AM
User is offline mpdan
28 posts
10th Ranked


Re: Replace Portions of the URL? (ie; rename "tabid" to "anotherword")  

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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Replace Portions of the URL? (ie; rename "tabid" to "anotherword")
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNNCovered.com - Your Offshore Dotnetnuke Partner
Dnncovered.com is the only Dotnetnuke offshore outsourcing center specializes in DNN skinning and module development with lowest pricing and quality service. Our staff is dedicated to websites based on DNN and our graphic designers are creative and imaginative well enough to provide customers the complete set of skinning solutions and packages
www.dnncovered.com
PointClick.Net DNN Solutions
DotNetNuke Hosting Platform for Business and personal use.
PointClick.Net Hosted Solutions
Advanced Web Portals by Infoscaler
Infoscaler is a California based company that provides advanced Web Portals, E-commerce Sites, Database Applications and Intranet Solutions on the DotNetNuke and Microsoft.NET platforms.
www.infoscaler.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP