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 ...Redirecting a URLRedirecting a URL
Previous
 
Next
New Post
1/20/2012 2:53 PM
 
There must be a way to do this, but I’m not seeing it.

I have four web sites: www.mybiz.com, store.mybiz.com, betawww.mybiz.com and betastore.mybiz.com.  The first two are the Production site on one server.  The Beta sites are on the test server.  Users access the www or betawww sites, but they could enter the Store by clicking links.  Currently the sites are totally separate, so the www site links to the Store (and vice versa), and the betawww sites points to betastore.  It’s all hard-coded (and was that way long before I got here).

We’re going to be moving to Content Staging, so I don’t think we can use this setup anymore.  If the Beta site gets published to the Live site, users might accidentally switch between the Live and Beta sites.  Not a good idea.

What I would really like is to have all links in all sites show www.mybiz.com and store.mybiz.com.  Then in the Beta site, DNN would know that any attempt to navigate to store.mybiz.com would redirect to betastore.  Similarly, if you’re in the betastore and attempt to go to www.mybiz.com, it redirects to betawww.mybiz.com.  And even if I could figure out how to get a URL to redirect, I would not want that DNN configuration, itself, to get published.  That has to stay on the beta server, and not get copied to the Live server.

I tried creating a Friendly URL that converted store.mybiz.com to betastore.mybiz.com, but it didn't do anything.  I also considered a dummy web site, with IIS redirecting the URL, but I think that might block anybody from ever getting to the Live site.

So I could use a clue. What else can I try?

Thanks
Dan
 
New Post
1/21/2012 8:15 AM
 
Low tech option
On the machine that does the testing, add a record in hosts file and have store.mybiz.com points to the IP of the betastore. Location of hosts file is in C:\Windows\System32\drivers\etc

Hight tech option suitable for long term goal staging: virtualize the servers and put them into virtual network. This is typically done when upgrade system like MS Exchange server. Use Windows 2008 R enterprise will allow to run 4 virtual machines inside one physcial host.
 
New Post
1/23/2012 11:08 AM
 
Thanks for the suggestions.  However, I decided I needed to change the Urls on the way out, rathar than try to figure out what the user needed after the fact.

We have two ways for links to appear on the screens. One is simply hard-coded in the skins.  I created my own DNN control, based on HyperLink, that looks at Request.Url.Host.  If the link starts with "beta", then the control's NavigateUrl  is set to the betastore Url, etc.

We also have links defined in the HTMLText.Content and TabModules.Header/Footer fields.  I created a new javascript function and added it to dnncore.js.  (Not a great solution, but couldn't figure out any other way to make it accessible to all screens.)  Again, it looks at the current Url and generates the name of the associated store.  I updated all links in the database from href='http://store.mybiz.com' to  href=' GotoStore();'  Generally, that works fine.  My problem now is that whenever I edit the DNN module, it deletes the "javascript" from the HTMLText.content.  Not sure how I'm going to handle that yet.

I'm just posting this in case anyone else has this situation.  If there are other way to do this, I'd be interested to hear.

Cheers
Dan
 
New Post
1/23/2012 12:28 PM
 
Doh!

I've been reading that DNN has removed any ability to embed javascript in HTMLtext content.  (I wonder why they still allow it in Headers and Footers.)  I added the javascript to the content via SQL Server, but obviously users attempting to update the content will break it as soon as they save. I've read there are Role flags that allow javascript, and flags in a Telerik XML, but those have no affect in Beta.

Interestingly, it works fine on my development machine.  Saving the content does not remove "javascript", even though the dev machine is a local copy of the beta code.

I'll have to re-think my solution.  I'm really worried that users on the beta machine will accidentally switch to the live store and start creating orders.

 
New Post
1/23/2012 2:23 PM
 
Hi, which versions of DNN are you on? In DNN 6.1.2 you have the option to switch script removal off in the Host > HTML Editor Manager settings.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Redirecting a URLRedirecting a URL


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