LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-01-2007, 04:40 AM   #1
koscek
Member
 
Registered: May 2006
Distribution: Fedora 7
Posts: 34

Rep: Reputation: 15
Redirect page


how to make this happen ?
if i want each time user try to browse any page for internet/local...it will redirect to a certain/start page

Last edited by koscek; 11-01-2007 at 04:47 AM.
 
Old 11-01-2007, 05:33 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
can you explain more about what you're doing? are you intercepting requests or you do want to write certain web pages which will redirect to somewhere else? for the latter, a simple html meta-refresh will do it in one line, btu the former is more involved. more details please!
 
Old 11-01-2007, 06:36 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
like this?

Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Billy's Home Page</TITLE>
<meta http-equiv="refresh"
content="0; URL=./cgi-bin/index.cgi" />
</HEAD><BODY></BODY>
content="0" is the delay in seconds

Last edited by bigearsbilly; 11-01-2007 at 06:38 AM.
 
Old 11-01-2007, 07:56 AM   #4
koscek
Member
 
Registered: May 2006
Distribution: Fedora 7
Posts: 34

Original Poster
Rep: Reputation: 15
let say, when user open their browser application and want to surf it will automatically redirect the page to certain page
 
Old 11-01-2007, 10:42 AM   #5
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
er, i just showed you a method
??
 
Old 11-01-2007, 11:51 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well no is *looks* like they want to control users on a LAN, in which case we need more information about your network, services and overall topology
 
Old 11-01-2007, 03:08 PM   #7
koscek
Member
 
Registered: May 2006
Distribution: Fedora 7
Posts: 34

Original Poster
Rep: Reputation: 15
pardon

i want to redirect it to front page of my local web server (apache)
 
Old 11-01-2007, 03:10 PM   #8
student04
Member
 
Registered: Jan 2004
Location: USA
Distribution: macOS, OpenBSD
Posts: 669

Rep: Reputation: 34
Code:
<html>
<body>
Click here to go to the right page:<br>
<a href="correct_target.html" target="_self">link</a>
</body>
</html>
Not an automagical redirection, but still works.

Did you try what bigearsbilly suggested?
 
Old 11-01-2007, 04:54 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
still seems to me like you've still not actually defined your situation to any useful extent.
 
Old 11-02-2007, 04:29 AM   #10
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,516

Rep: Reputation: 240Reputation: 240Reputation: 240
i give up
 
  


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
Squid Redirect to welcome page on first internet access omid1979 Linux - Networking 3 10-15-2009 03:48 AM
Apache default page redirect Harry Seldon Linux - Enterprise 7 05-12-2006 09:50 AM
page redirect after selecting option in html juanbobo Programming 1 05-13-2005 08:05 AM
mod_python: Sending data to a redirect page nko Programming 1 04-12-2005 06:23 PM
how to redirect PHP code to another page bahadur Programming 3 03-21-2005 06:59 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:31 PM.

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