473,587 Members | 2,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Header Redirect with Anchor Workaround

4 New Member
Here's a workaround that worked for me on a PC, Safari 3, FF 2, IE 7:

Basically, you need an intermediary redirect page with a urlencode'd
path. For example:

AnyPage.php:

$path = urlencode($_SER VER['PHP_SELF'] . "?arg1=a&arg2=b #anchor");
header("locatio n:redirect.php? returnpath=$pat h");

redirect.php:

header("locatio n:" . $_REQUEST["returnpath "]);
Oct 3 '07 #1
0 1351

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

Similar topics

10
9339
by: Bob Garbados | last post by:
forgive my ignorance, as I'm new to php coming from a ms background... If I create a page named redirect.php and it's only content is: <?php header("Location: http://www.google.com"); ?> Should it not redirect to www.google.com? I can't get the header() function to redirect. I'm trying to take an online reservation... the customer...
4
3349
by: BT3 | last post by:
I appreciate the links on the session variables. I had actually hit that and finished the login and supporting pages. Thanks for everything. I noticed that PHP.NET said to do a HEADER Location: for a client re-direct. When I do that thoughm it seems either the session is destroyed, or the ID is lost. If I set session variables, then do a...
5
8981
by: Peroq | last post by:
Hi all, All of these fail : response.redirect("page.asp?Param=Param#Anchor") response.redirect("page.asp#Anchor?Param=Param") This one works fine : location.href = "page.asp?Param=Param#Anchor" I have a solution i dont like :
2
2739
by: Jörg Draeger | last post by:
Hi ng, I have to do a multiple redirect. That means one ASP-script should do more than one HTTP-request. e.g. response.redirect(url1) response.redirect(url2) ...
3
2293
by: ehm | last post by:
I have encountered an issue that has me totally confused. I have a page where the user clicks on a hyper-text link and is then directed towards another page (passing additional variables, etc.). If the anchor text does not contain the "@" symbol, clicking on the link works in a normal fashion. However, if the anchor text is something like...
10
7882
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into the URL, in the format http://yourapplicationpath/(Session.SessionID)/... which saves numerous headaches when it comes to storing state across page...
12
1884
by: Jerim79 | last post by:
I have created a verification script to verify information and redirect the customer to the appropriate error page. For example: if ($FName=""){ header('Location:/verify_fname.htm'); } else{ if ($LName=""){ header('Location:/verify_lname.htm'); }
19
2205
by: Justin | last post by:
Harlow... i need some help on these... im actually trying to do a page using php... the function is to receive certain parameters from a 3rd party provider... and i need to redirect my page to another page after certain validation. it's ok when i use the url to do the testing... the validation part works fine... scenario as below: if...
2
2169
by: JRough | last post by:
I have this code that switches templates depending on if the user fills in a form with a request. The request asks for the $mark & $number. If that request gets input then it displays a list otherwise it re-displays the form request. The $template variable changes the value of which template is displayed. if($mark&&$num){ $mark = $mark =...
0
7918
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...
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8206
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. ...
0
8340
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...
0
6621
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
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...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
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
0
1185
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...

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.