473,511 Members | 15,081 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($_SERVER['PHP_SELF'] . "?arg1=a&arg2=b#anchor");
header("location:redirect.php?returnpath=$path");

redirect.php:

header("location:" . $_REQUEST["returnpath"]);
Oct 3 '07 #1
0 1342

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

Similar topics

10
9294
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"); ?>...
4
3341
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:...
5
8974
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 =...
2
2733
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
2289
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...
10
7852
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...
12
1862
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{...
19
2196
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...
2
2165
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...
0
7252
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
7371
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
7093
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
7517
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5676
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,...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
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
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1583
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 ...

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.