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...Upgrading DNN P...Upgrading DNN P...Friendly URL Settings RegEx not workingFriendly URL Settings RegEx not working
Previous
 
Next
New Post
12/25/2014 10:12 AM
 

I upgraded from an old version 4.09 to 7.3. Everything seems to be working fine except the regular expression I had setup for rewriting URLs. In 4.09 I had a rule in Friendly URL Settings (Host Settings) of the following:

MATCH: "[^?]*/Jobs/([0-9]{1,3})[a-zA-z].aspx"
REPLACE WITH: "/jobs/$1.aspx"

It works fine in 4.09 but it does not work at all in 7.3. My config is set to "advanced" for DNNFriendlyURLs config in the web.config. So, I'm wondering if these rules work when "advanced" mode is set. If so, why do you think this isn't working? If these rules no longer work in "advanced" mode, then what is my alternative to get this to work? I tried going back to "humanfriendly" and it still didn't work. 

Here's what I want to accomplish. If a URL is say "http://abcd.com/jobs/123a.aspx" then I want it to be rewritten to "http://abcd.com/jobs/123.aspx". So, the match finds 1 to 3 digits followed by a single letter and replaces it with just the numbers found and removes the letter. 123a, 123b, 123c, etc. would map to 123.

Any assistance would be greatly appreciated.

 
New Post
12/25/2014 8:27 PM
 
as far as I know the rules still work fine, what's more likely to have happened is that an earlier context rewrite from the friendly url provider means that the url rule is not processed. I'd recommend taking a look at the requests in a http proxy such as Fiddler to see what url(s) are called. Also, please note, the advanced url provider works in an extensionless mode so pages no longer end in .aspx -however that should not be an issue for you as it's not enabled by default on an upgrade i.e. you have to activate it (http://www.dnnsoftware.com/wiki/page/...).BTW you can force extension usage (most times it's to provide security-by-obscurity by pretending to be something else) http://www.dnnsoftware.com/wiki/page/...

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
12/26/2014 11:31 AM
 
Thanks. I've already configured advanced mode in web.config. If I go to /jobs/55e.aspx it does a 301 and then goes to jobs/55e and shows the jobs page instead of the 55 page. If i got to /jobs/55e instead, it gets a 200 response and goes to the /Jobs page. Not sure why.
 
New Post
12/26/2014 11:54 AM
 
Follow up. Even when I delete the rule and I go to /jobs/55e, it goes to the jobs page though in the address bar it shows /jobs/55a. So, it's on jobs but shows /jobs/55a. It's as if the rule is having no effect at all.
 
New Post
12/26/2014 3:53 PM
 

Yet another followup. I don't think the rule is even processing. I deleted the rule and find that no matter what I put after jobs other than a real page it keeps going to the jobs page with the address bar showing the intended page.

For example, if I go to /jobs/55, then it goes to 55 because I have that page and it shows what's on 55. But, if I go to /jobs/55a or /jobs/asdf or /jobs/fred or anything other than an existing page, it keeps the URL in the address bar but the page that shows is the jobs page. You would think it would go to the 404 page but it doesn't. 

Something is all messed up or I don't understand what it's doing. See screen shot below after clicking on the 59 link which should error out because 59a is not an existing page and yet it shows the jobs page with the 59a in the address bar.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Friendly URL Settings RegEx not workingFriendly URL Settings RegEx 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