LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-06-2009, 02:37 PM   #1
turnerd@hutchesons.org
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
php redirect scripts https squid


Hi All

This has probable been asked before but here goes I want to allow wireless user access to intranet. I have setup squid as transparent proxy and created a redirect php scrip with works great untill I try to access and ssl page for login.

I have no access to change client proxy settings so I need it to be zero config on the client.

I would like to set it up so no matter what page the user tries to access they will always be retured to the page of my choice.

This is my script

#!/usr/bin/php
<?php

$temp = array();

while ( $input = fgets(STDIN) ) {
// Split the output (space delimited) from squid into an array.
$temp = split(' ', $input);

// Set the URL from squid to a temporary holder.
$output = $temp[0] . "\n";

// Check the URL and rewrite it if it matches limewire.com
if ( strpos($temp[0], "myserver") == FALSE) {
$output = "302:myserver/\n";
}
echo $output;
}
This is all very new to me

Cheers David
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
extensionless url with https redirect ulver Linux - Server 2 01-21-2009 04:54 AM
How to redirect http to https? Sovan Linux - Server 1 12-03-2008 01:11 PM
redirect http to https awreneau Linux - Server 17 10-14-2008 09:13 AM
reverse Squid does HTTPS for hidden apache, how does PHP know? dlublink Linux - Server 1 08-21-2008 09:04 AM
weird https redirect EmOuBi Linux - Desktop 0 07-17-2008 01:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration