Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 20th, 2006, 08:16 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default No Access Redirect

Hi Everyone,

Please help. I have a webpage on the InTERnet. On this page, there are a couple of links, and one of them links to the InTRAnet.

My issue is, what do I have to do to this link where if someone have access to the InTRAnet, the link will work. HOWEVER, if they don't have access, and the person click on the link, a page or pop-up window will have a message saying, 'you do not have access to the InTRAnet?

In other words, how do I test or validate that if a person has access, then he/she could go to the URL fine, but if no access, a error message will show?

Thank you.

Leon
 
Old March 21st, 2006, 11:34 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

If this was me, people actually hitting the web server from the Net (outside of your business network) they wouldn't even see the link to your internal resources. (And btw, this is bad pratice anyway, you should never link to internal references from an external site (even if the webserver is hosted in house))

For all intents and purposes ill assume that you have some sort of domain set up so what I would do is, using either ASP or ASP.net Request.ServerVariables("Remote_User") which will return 2 values, either A) yourdomain\johndoe (If a person is on your network) or B) it wont return anything if the user is on the net.

So your logic is :

If Remote_User is not null then display links else display nothing

I would say if people arent supposed to be able to link to it, don't even let them know that its there. (Besides, your system is flawed if i disable Javascript in my browser)

"The one language all programmers understand is profanity."
 
Old March 23rd, 2006, 12:23 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Thank you for your advice. I know it is bad practice to link from InTERnet to InTRAnet. I have been trying to explain that to management, but there are some things on the InTRAnet that they really want to be able to access from home(Internet). And there is no way we will move those things into the InTERnet. So, I am stuck with finding a way to do this, or tell management "i just can't help you."

Can you think of any work-arounds to solve my issue? I added a simple login page that have the links to the InTRAnet, but I know that is not enough.

"If this was me, people actually hitting the web server from the Net (outside of your business network) they wouldn't even see the link to your internal resources." How would I 'hide' those links? Or did you meant to not even put those links on the NET in the first place?

Thanks again.

Leon








Similar Threads
Thread Thread Starter Forum Replies Last Post
Page redirect help jroxit Classic ASP Basics 7 August 11th, 2008 11:01 AM
Redirect SKhna ASP.NET 2.0 Basics 1 February 9th, 2008 08:14 AM
response.redirect ava_h .NET Framework 2.0 0 October 18th, 2006 10:21 PM
Automatic Redirect r_ganesh76 General .NET 3 September 9th, 2004 07:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.