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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...URL redirect using siteurls & host settings not workingURL redirect using siteurls & host settings not working
Previous
 
Next
New Post
1/23/2011 11:46 PM
 
Hi - I'm trying to redirect

www.mysite.com/PressCentre

to

www.mysite.com/PressMediaCentre/tabid/131/Default.aspx

I've tried this in the siteurls.config, and also by adding a new rule in the 'friendly URLs' settings in the advanced host settings.

However, neither have worked. I'm probably just getting the rule wrong - I used:

<RewriterRule>
<LookFor>*/PressCentre</LookFor>
<SendTo>~/PressMediaCentre/tabid/131/Default.aspx</SendTo>
</RewriterRule>

And the same in the friendly URLs settings.

Any ideas?
cheers
-E


 
New Post
1/24/2011 5:11 AM
 
Hi Elliot

Unfortunately that's never going to work.

The siteurls.config file is used for rewriting. So while the parameter looks very tempting, it's not actually for redirecting.

To redirect in DotNetNuke, you have to use the 'permanent redirect' option, which will redirect a url matching a DNN page to any other Url. So if you had a page called 'PressCentre' you could redirect it to the PressMediaCentre page.

However, on top of that, in order to get /presscentre to work, you have to switch off page extensions, which won't work with the standard DotNetNuke Url rewriter. Because otherwise only /presscentre.aspx will work.

The solution? Well the only way I know of is to purchase my module called 'Url Master', which will both allow you to switch off the .aspx, and to redirect the /presscentre Url as you wish to do.

It's all detailed here:
Creating a Url with no aspx extension on your DNN site
and
301 Redirect a Url to a DNN Page

There may be other ways to achieve this in DNN, but (obviously) this is the way I would do it.

regards
Bruce
 
New Post
1/24/2011 4:40 PM
 
Ok thanks Bruce, I had a feeling I might have misinterpreted the functionality. Budget for the website is tight however, so I'd rather avoid shelling out for extra modules, although yours does look very handy. So I'll probably go with the redirect - but how would I create a page with the url mysite.com/PressCentre.aspx? I thought DNN automatically added the tabID bits... cheers -E
 
New Post
1/24/2011 5:52 PM
 
Elliot - DNN has an option to switch on 'humanFriendly' Urls - which are just the Url without the tabid/xx in it. Just google 'humanFriendly' and you'll find instructions.

There is another, hacky way to get the Url. You can create a folder called 'PressCentre' in your IIS Folder, then drop in a simple 'index.htm' page. On that page, setup a 302 redirect to the actual DNN page you want to load. This will give you an extensionless Url for that Url. It's not particularly SEO-friendly or user-friendly, but I"m guessing the Url is for marketing or press releases, so looking better is the primary goal.
 
New Post
1/24/2011 6:15 PM
 
Thanks Bruce. I did read somewhere that switching on human friendly URLS can break existing links from other sources though, so I'm very wary about going down that route...
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...URL redirect using siteurls & host settings not workingURL redirect using siteurls & host settings not working


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