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 ...Best way to rewrite a URL? Is there something built-in?Best way to rewrite a URL? Is there something built-in?
Previous
 
Next
New Post
7/12/2010 9:30 AM
 
Mike wrote:
To make sure I follow, you want a url, http://mysite.com/page1 to really point to a different spot, http://mysite.com/page2.  But the info that shows in this new spot is the info found at http://mysite.com/page1?

In essence you want to "trick" the user.  The url will say they are on one page but really they are on another page.  Is that it?

Kind of, let me give you a little more background.

We have another site that is a shopping cart. I want to be able to display products from that site in a custom module that I'll build for this DNN site. If the user clicks on a product's link in (let's say) a GridView, I want to show the product detail on a page (say productdetail.aspx) but have the URL in the browser show the URL from the cart which would be something like "p-123-generic-product.aspx".

I'm not sure if the URLMaster handles things in that way from what I've seen of it.

 
New Post
7/12/2010 11:13 AM
 
Sorry andrew, I'm still not following what you're trying to do. Maybe you can give a simple example like the one I did with mysite.com/page1 /page2 instead of the 123-..... urls. Not sure if it will help, but I don't follow what you're trying to do.
 
New Post
7/12/2010 11:39 AM
 
Mike wrote:
Sorry andrew, I'm still not following what you're trying to do. Maybe you can give a simple example like the one I did with mysite.com/page1 /page2 instead of the 123-..... urls. Not sure if it will help, but I don't follow what you're trying to do.

Mike, first of all, thanks for taking the time to help me.

I'll have a dynamically created GridView with a list of products. The product name in the GridView will be a HyperLink that will have a NavigateUrl that is built dynamically from the database so it mimicks the URL the shopping cart site uses for that product.

Product One - NavigateUrl = p-1-Product-One.aspx
Product Two - NavigateUrl = p-2-Product-Two.aspx
Product Three - NavigateUrl = p-3-Product-Three.aspx

When you click on the product in the GridView, it sees the RegEx pattern (/p-([0-9]*)-(.*)\.aspx(?:\?(.*))?) of the URLs above and redirects to "productdetail.aspx" but I want the URL to still appear as "p-1-Product-One.aspx" instead of "productdetail.aspx". 

Looking at the Web.config of the cart,  I see

<rule>
  <url>/p-([0-9]*)-(.*)\.aspx(?:\?(.*))?</url>
  <rewrite>/showproduct.aspx?ProductID=$1&SEName=$2&$3</rewrite>
</rule>

and the URL in the browser always looks like "p-1-Product-One.aspx", you never see the "showproduct.aspx?ProductID..." so I need to figure out how to do something similar to that.

 
New Post
7/12/2010 11:47 AM
 

You should be able to do this with Ifinity's URL Master module.


Shebang Websites - A product of Mogridge Design
Hey, we're partnered with UntangleMyWeb.com

 
New Post
7/12/2010 11:54 AM
 
Jon Edwards wrote:

You should be able to do this with Ifinity's URL Master module.

Thanks Jon (and Rod)...I took a quick look at that on Friday and I saw where I could redirect to a different page but it didn't hold the URL as "p-1-Product-One.aspx" it changed it to "productdetail.aspx".

I'll have to set up a test site, roll up my sleeves, and really take a look at what URL Master can do.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Best way to rewrite a URL? Is there something built-in?Best way to rewrite a URL? Is there something built-in?


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