Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 redirection to another page using PAC file
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 13 April 2004 :  05:22:37  Show Profile  Visit MarcelG's Homepage
Okay, here's a puzzle...at least it is for me.
We're using a PAC file to restrict access to certain websites.
We've got several proxy servers, but our own dept has no authorisation on those servers to change something, so that's why we're using this system.
The system is very simple:
- if the URL is registered, return the correct proxy server address for that URL
- if the URL is NOT registered, return a non-existing proxy server address for that URL -> ergo, time-out.

Now, I'd like to change this last piece.
If the URL is NOT registered, I'd like to 'redirect' the request to another page on our intranet-site, which sais something like "The page you requested is not registered in the list of authorized URL's. If you need to access this page, submit a change-request at this e-mail adres <bla@bladiebla.bla>".

However, I don't know if this is possible with only a PAC file.

The current pac file is build as this: (specifics removed because of confidentiality):
function FindProxyForURL(url, host) 
{ 
if (isPlainHostName(host) || 
dnsDomainIs(host, ".ourinternaldomain.com") || 
dnsDomainIs(host, ".ourolddomain.com") || 
localHostOrDomainIs(host, "127.0.0.1")) 
return "DIRECT"; 

else if (dnsDomainIs(host, ".customerdomain1.com") || 
dnsDomainIs(host, ".customerdomain2.com")) 
return "PROXY thespecialproxyserver.ourdomain.com:8080"; 

else if (dnsDomainIs(host, ".ourdomain.com") ||
dnsDomainIs(host, ".google.nl") ||
dnsDomainIs(host, ".dell.com")) 
return "PROXY thenormalproxyserver.ourdomain.com:8080"; 

else return "127.0.0.1"; 
}
Any hints would be very welcome!

portfolio - linkshrinker - oxle - twitter

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 13 April 2004 :  18:19:31  Show Profile
We have something like this for our proxy.pac file:
function FindProxyForURL(url, host)
{
	// Direct Connections for non-FQDN hosts
	if (isPlainHostName(host)) {
		return "DIRECT";
	}
	if (dnsDomainIs(host,"127.0.0.1")) {
		return "DIRECT";
	}
	//Required for CiscoSecure Server used by NET Dept.
	if (dnsDomainIs(host, "(IP Address in here)")) {
		return "DIRECT";
	}
	// Required for Block page return
	if (dnsDomainIs(host,"(proxy server here)")) {
		return "DIRECT";
	}
	// Generic Web site, 
	if (shExpMatch(url,"https://www.yoururl.com/*")) {
		return "DIRECT";
	}
	if (dnsDomainIs(host,".(Internal name)")) {
		return "DIRECT";
	}
	// Otherwise for the Internet use the proxy
		return "PROXY (Proxy IP address):80";
	}
Notice the red are just changed to suit, but we do have what you are trying to do as if there is a site we go to that has a certian word in the url, it sends us to a page that tells us to contact whoever to gain access to it.

This is done on the proxy server side of things with software called Web Sense.

I hope that helps.

Cheers,

David Greening
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 14 April 2004 :  02:04:05  Show Profile  Visit MarcelG's Homepage
David, thanks for the tip about WebSense! I've got some reading to do now

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

sr_erick
Senior Member

USA
1318 Posts

Posted - 14 April 2004 :  02:54:40  Show Profile  Visit sr_erick's Homepage  Send sr_erick a Yahoo! Message
We use websense at work to filter all of our filtered customers. I'd have to say it works extremely well. It's very accurate and excellent product. We've even modified it to filter out porographic e-mail content on those filtered accounts, along with spam filtering that the spam servers do if you have that applied to your account.




Erick
Snowmobile Fanatics


Edited by - sr_erick on 14 April 2004 02:57:10
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07