LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-21-2009, 10:02 AM   #1
landysaccount
Member
 
Registered: Sep 2008
Location: Dominican Republic
Distribution: Debian
Posts: 188

Rep: Reputation: 18
Help redirecting blocked user to page


Hello.

I recently did a simple php script that will write certain users' mac address to a file which is then taken by another script that would block those mac addresses and will not let them go to the internet. Now I would like to add something else to it:

I would like to redirect users with the mac addresses to a certain page when they try to go to the internet so, they would know they're blocked from using the internet for any reason.

How can that be accomplished?

Thanks in advanced for your help.
 
Old 02-21-2009, 12:10 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 376Reputation: 376Reputation: 376Reputation: 376
Quote:
Originally Posted by landysaccount View Post
Hello.

I recently did a simple php script that will write certain users' mac address to a file which is then taken by another script that would block those mac addresses and will not let them go to the internet. Now I would like to add something else to it:

I would like to redirect users with the mac addresses to a certain page when they try to go to the internet so, they would know they're blocked from using the internet for any reason.

How can that be accomplished?

Thanks in advanced for your help.
Example:
PHP Code:
if ($BadMAC)
   {
   
header("Location: ./access_denied.php")
   }; 
Keep in mind this would need to happen before any output is sent - see here.

Last edited by win32sux; 02-21-2009 at 12:14 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with redirecting links to the same page php orfiyus Programming 2 02-12-2008 09:20 AM
redirecting https web page to http internal website baboow Linux - Server 2 12-17-2007 09:27 AM
User blocked from linux LQ SUBARU LQ Suggestions & Feedback 12 06-18-2006 07:15 PM
first 1024 ports blocked for normal user unixguru Linux - Security 3 05-07-2006 07:45 AM
Redirecting non-user mail to a local address? Trent Hatred Red Hat 2 11-19-2003 11:59 AM


All times are GMT -5. The time now is 04:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration