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 Rewriter to change domain?URL Rewriter to change domain?
Previous
 
Next
New Post
9/26/2007 1:44 PM
 

Is there a way to use the URL Rewriter configuration to change the name of the domain name?   For instance, I have a subdomain that I wish to sunset, and I want to transparently take the visitor to that other page.  The result I expect to see is the domain in the URL change, and nothing else.

Here is what I have begun, but I am unsure as to how I should go about changing the URL while maintaining any previous parameters.

<RewriterRule>
<LookFor>.*(subdomain\.domain\.com).*/TabId/(\d+)(.*)</LookFor>
<SendTo>~/Default.aspx?TabId=$2</SendTo>
</RewriterRule>

So, if the following URL were requested:

http://subdomain.domain.com/Home/tabid/36/Default.aspx

It would then get forwarded to:

http://www.domain.com/Home/tabid/36/Default.aspx

In addition, I would want to make sure I do not break any module workflows.  So, I would hope that it could also accomodate this example:

http://subdomain.domain.com/Community/Blogs/tabid/36/EntryID/1234/Default.aspx

And switch it to this:

http://www.domain.com/Community/Blogs/tabid/36/EntryID/1234/Default.aspx

Basically, I want everything intact except for the subdomain.


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
9/27/2007 1:26 PM
 

Does anyone have any other suggestions at how to go about doing this?  In the meantime, I have created a copy of the UrlRewrite provider and am explicitly rewriting the URL there, but the first request still resolves the subdomain.  All of the links rendered on the page are then using the correct domain, but I am still needing to intercept and change the originally requested domain name.  Any ideas?


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
9/28/2007 10:09 AM
 

Okay.  I know that this is not the most elegant approach, and it is not the most SEO friendly approach either, but using the URLRewrite Module and its configuration, I was able to almost get this completed using the following config snippet:

    <RewriterRule>
      <LookFor>.*(subdomain\.domain\.com)(.*)/TabId/(\d+).*</LookFor>
      <SendTo>http://www.domain.com$2/tabid/$3/Default.aspx</SendTo>
    </RewriterRule>

At first glance, it would appear that this should work.  However, there are some very distinct weaknesses:

  • I am not sending a HTTP Response 301 header to search spiders
  • I am cutting out (or duplicating) the Portal Alias functionality in Site Settings
  • I am still getting the folder path sent as a querystring

Does anyone have any idea why I still get the folder path returned as a querystring even though I have it in the rewritten url?

For example, this URL is rewritten:

http://subdomain.domain.com/Home/Feedback/tabid/123/Default.aspx

To be:

http://www.domain.com/Home/Feedback/tabid/123/Default.aspx?Home=Feedback

Argh!...


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
10/1/2007 1:21 PM
 

^^~Bump~^^

Does anyone have any ideas on my previous post in this thread?


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...URL Rewriter to change domain?URL Rewriter to change domain?


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