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  |  

  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
The best choice for your web site host, email hosting, and domain registration.
 


  Sponsors  

Meet Our Sponsors

.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  URL Rewriting
Previous Previous
 
Next Next
New Post 6/24/2008 6:34 AM
User is offline Will Strohl
1333 posts
Orlando.DotNetNukeUG.Net/
6th Ranked




Re: URL Rewriting 

Then the LOOKFOR rule needs a little touch-up.  I just wrote that as a first draft without any checking.  For really getting RegEx right, you need to use a tool like RegEx Buddy (not free, but it is the best out there and cheaper than it could be), The Regulator (open source, buggy, and abandonded, but otherwise does the job fairly well), or RegEx Lib (free online regex validator).


Will LinkedIn profile
StrohlSiteDesign.com | My Blog | DotNetNuke® Skins by SSD
Google Toolbar Button for DNN | Suggested DNN Upgrade Paths
ODUG Web Site
 
New Post 6/25/2008 12:34 AM
User is offline ThunderHorn
13 posts
10th Ranked


Re: URL Rewriting 

Thanks for all the help allready, but it still doesn't work.

I used the tool "Regex Buddy", i generated a regex that is tested and works.

But still when I insert the expression in the siteurls.Config: no result.

Do I need to change something in the web.Config or the dotnetnuke host/portal settings?
Install a third party url-rewriter? I have turned human friendlyurls on, can that be a problem?

Greetz

 
New Post 6/25/2008 5:09 AM
User is offline Will Strohl
1333 posts
Orlando.DotNetNukeUG.Net/
6th Ranked




Re: URL Rewriting 

FriendlyURLs should indeed be enabled for this to work.  That's fine.  I am glad you used RegEx Buddy.  That is a great tool.  Let's get back to the actual problem though...

When you say "no result", what does that mean?  Are you redirected to the home page?  Are you faced with a 404 error?  What happens?


Will LinkedIn profile
StrohlSiteDesign.com | My Blog | DotNetNuke® Skins by SSD
Google Toolbar Button for DNN | Suggested DNN Upgrade Paths
ODUG Web Site
 
New Post 6/25/2008 7:00 AM
User is offline ThunderHorn
13 posts
10th Ranked


Re: URL Rewriting 

I still get the following error:

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.

Requested URL: /dotnetnuke/desktopmodules/articledetail.aspx

 

My siteurls.Config file now looks like this:

<RewriterConfig>
   <Rules>
        <RewriterRule>
             <LookFor>.*/DesktopModules/ArticleDetail\.aspx.+itemid=(\d+).*</LookFor>
             <SendTo>~/Default.aspx?TabId=69&amp;ArticleID=$1</SendTo>
        </RewriterRule>
   <Rules>
</RewriterRule>

Greetz

 
New Post 6/25/2008 5:54 PM
User is offline Will Strohl
1333 posts
Orlando.DotNetNukeUG.Net/
6th Ranked




Re: URL Rewriting 
Modified By Will Strohl  on 6/25/2008 9:00:06 PM)

This will work.

    <RewriterRule>
      <LookFor>.*ArticleDetail\.aspx.*(itemid=(\d+)).*</LookFor>
      <SendTo>~/Default.aspx?tabid=69&amp;ArticleID=$1</SendTo>
    </RewriterRule>

However, if the original URL contains the MID querystring value, DNN will react to it and not display the page properly.

I should add that I used to be able to explicitly specify the URL (instead of using the tilde ~), then the rewritten URL would completely replace the original.  I just tested this on a 4.08.03 install and it didn't do it, but the rewrite still took place.  Here is an example of what I am talking about.

    <RewriterRule>
      <LookFor>.*ArticleDetail\.aspx.*(itemid=(\d+)).*</LookFor>
      <SendTo>http://www.YourDomain.com/Default.aspx?tabid=69&amp;ArticleID=$1</SendTo>
    </RewriterRule>

Will LinkedIn profile
StrohlSiteDesign.com | My Blog | DotNetNuke® Skins by SSD
Google Toolbar Button for DNN | Suggested DNN Upgrade Paths
ODUG Web Site
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  URL Rewriting
 


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.

 


UK - DotNetNuke providers
UK providers of DNN module development and skin package design. Oxford Information Labs provides cost-effective solutions for businesses and organisations specialising in Skin design and bespoke module development.
www.oxil.co.uk
TronixSoft
Hosting for local businesses that want more from their websites.
www.TronixSoft.com
The Forerunner Network
The Forerunner Network consists of a group of Dynamic Website & Interactive Membership Portal hosting services that are managed by Forerunner Communications. Our services span a wide range of markets and enable individuals, organizations and businesses to build and manage dynamic, interactive portals and websites.
The Forerunner Network

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