473,508 Members | 2,331 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 1858
acoder
16,027 Recognized Expert Moderator MVP
[PHP]<?php
header('Location: http://www.yoursite.com/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("Location: ./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("location:yourpage.php");
?>

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

<?php
header("location:http://www.yoursite.com/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
3268
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....
1
4751
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...
2
1922
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...
1
4167
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...
2
2816
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...
9
1968
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"...
2
1939
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...
5
4545
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...
1
1127
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...
10
9001
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
7229
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,...
0
7129
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7333
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,...
1
7061
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...
0
5637
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5057
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...
0
3208
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...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
428
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...

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.