473,668 Members | 2,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to redirect a webpage in php

4 New Member
how to redirect a webpage in php
Jan 16 '07 #1
6 1867
acoder
16,027 Recognized Expert Moderator MVP
[PHP]<?php
header('Locatio n: http://www.yoursite.co m/yourpage.php') ;
?>[/PHP]
This must appear before anything else on the page otherwise the redirect will not work.
Jan 16 '07 #2
ronverdonk
4,258 Recognized Expert Specialist
I hope you mean 'any headers' or 'any output'.

Ronald :cool:
Jan 16 '07 #3
NSR
2 New Member
I hope u meet ur requirement by this....


header("Locatio n: ./to the page u like to ridirect");
Jan 17 '07 #4
acoder
16,027 Recognized Expert Moderator MVP
I hope you mean 'any headers' or 'any output'.

Ronald :cool:
Yes, that's more precise.
Jan 17 '07 #5
tathagata
6 New Member
if you want redirect the page in your project then
<?php
header("locatio n:yourpage.php" );
?>

if you want redirect the page in another project then just put the url like

<?php
header("locatio n:http://www.yoursite.co m/yourpage.php");
?>
Jan 18 '07 #6
ozgur uksal
2 New Member
You can find everything you need at
http://us2.php.net/header

good luck
ozgur uksal
Jan 18 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

8
3279
by: Don Miller | last post by:
I have an ASP script that is called from a PDF form to process form data. On the last line of the script I have a Response.Redirect "webpage.asp" that leads to another target page with actual HTML. However when I start this process (by submitting form data) even when I comment out the processing code, the address bar shows the desired page, but the page never appears and the flag keeps spinning indefinitely (and doesn't stop even after 15...
1
4760
by: Paul Lee | last post by:
Hi all, I'm trying to redirect users from a specific domain to one of my webpages. So, in my example, anyone accessing my index.html from the *btinternet.com domain (allowing for wildcards!) will be redirected to "update.htm". I'm not bothered what the referring webpage was, I'm just interested in anyone accessing my page from a certain domain
2
1932
by: OnLiner | last post by:
I have a site with hundreds of pages. I often get visits from people who have linked to individual pages and not to the main index page. This means that they do not have the correct menu/navigation system to view the rest of the site with. I know how to redirect them to the index page, but that means they then have to search the site for the page they just left. Is there a way using JavaScript to open the page they are currently...
1
4200
by: Jac | last post by:
Aspx-problem : I want to write code (C-sharp) behind a button, that determines on some criteria which webpage an IFRAME has to show. To change a normal webpage you do a redirect in c-scharp (response.redirect "page1.aspx). But in a webpage I have an IFRAME and I want only to change the contents of that IFRAME. In a previous question Cliff proposed the following on the static part: <a href="newIframepage.aspx?par1=something"...
2
2832
by: Alan Scott | last post by:
I am using the following code to redirect users to another webpage when they click on an image: Response.Redirect("login.aspx"); The code works. However, I have frames setup and would like the form to be display in the main window, not the side panel. Is there a way to do this?
9
1983
by: postings | last post by:
Just a quick question... When I do a "response.redirect" from a source webpage to a destination webpage, does the code on the source webpage carry on executing unless I put a "response.end" straight the "response.redirect" command? I know about server.transfer BTW, I just want to know what happens in this instance... Many thanks!
2
1952
by: bryant_j_j | last post by:
Hi everyone, Does anybody know how to redirect every visitor to a webpage, except those coming from some specified IP addresses, to a different webpage? Does anybody know of a JavaScript for this or how to do it? For example, I want everyone who visits www.someaddress.org/myhomepage to be redirected to www.someaddress.org/myhomepage /index2.html, except for certain visitors with IP addresses A1.B1.C1.D1, A2.B2.C2.D2, ... or from a...
5
4562
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks a session variable, and if it is not present, does a Response.Redirect to a webpage for the CAS passing a url parameter for the url to post back to. The CAS provides a page for the user to log into, validates the username and password, and then...
1
1137
by: sureshreddy | last post by:
hi friends, I want the time to be displayed for a webpage to redirect to another webpage. You can see this concept in job sites when we fill all the details and click the search button it displays the results and displays as "Search Result returned within 0.041 seconds". I want to know how we can calculate the time. Give me a reply as soon as possible. If u know the code send to me. thanks in advance
10
9014
by: Eirik Eldorsen | last post by:
How can I 301 redirect www.example.com/default.aspx to www.example.com without using ISAPI filters?
0
8462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8797
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8583
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6209
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4205
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2791
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2023
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1786
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.