473,654 Members | 3,104 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

correct format for .php&redirect=

I'm working on setting up some affiliate links on a site of mine and I
haven't been able to get a redirect to work.

The original affiliate link looks like this:

http://www.exampleurl.com/index.php?ref=10

Rather than use this link however I am wanting to redirect to specific
product pages. A product page link would look like this:

http://www.exampleurl.com/example-pr...1-135_100.html

In the past I have been able to easily set up a redirect link simply by
combining the links with &redirect= such as:

http://www.exampleurl.com/index.php?ref=10&redirect=
http://www.exampleurl.com/example-pr...1-135_100.html

I understand this is probably not correct for PHP. I did play around
with it a lot to no avail, including the use of URL encoding. Thanks
in advance to anyone with a suggestion. :)

Jul 30 '06 #1
1 1797

st***********@y ahoo.com wrote:
I'm working on setting up some affiliate links on a site of mine and I
haven't been able to get a redirect to work.

The original affiliate link looks like this:

http://www.exampleurl.com/index.php?ref=10

Rather than use this link however I am wanting to redirect to specific
product pages. A product page link would look like this:

http://www.exampleurl.com/example-pr...1-135_100.html

In the past I have been able to easily set up a redirect link simply by
combining the links with &redirect= such as:

http://www.exampleurl.com/index.php?ref=10&redirect=
http://www.exampleurl.com/example-pr...1-135_100.html

I understand this is probably not correct for PHP. I did play around
with it a lot to no avail, including the use of URL encoding. Thanks
in advance to anyone with a suggestion. :)
It's hard to say much without being able to see the relavent portions
from your index.php file, but usually, you have to do something like
header('Locatio n: '.$_GET['redirect']) and then exit shortly there
after. $_GET['redirect'] should, of course, be checked against a white
list, or at the very least, for characters like "\r" and "\n", to
protect against http response splitting.

Jul 31 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3608
by: arenaTR | last post by:
I have some processing I want to do. I have a cgi scrpt that I want to call, it just sends an email. Can I use a simple "header" command for that? But then I want to use "header" again in order actually redirect for a script. Your help is, as always, appreciated. Mike
2
1640
by: Aardwolf | last post by:
I have recently started to convert several of my websites over to dynamic sites with pages written as requested with php and in some cases using mysql databases to supply data within parts of the pages rather than the plain HTML that they used to be writtten in. I am concerned as to how this will affect the ability of the search engine spiders to map out my websites. Can anyone tell me what the ramifications of doing this are, and if...
0
6425
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to be modified: if(e.CommandName =="Print") { string parsedreceipt = null; parsedreceipt = DecodeReceipt (e.Item.Cells.Text); Session = parsedreceipt;
1
3520
by: comp.lang.php | last post by:
require_once("/users/ppowell/web/php_global_vars.php"); if ($_GET) { // INITIALIZE VARS $fileID = @fopen("$userPath/xml/redirect.xml", 'r'); $stuff = @fread($fileID, @filesize("$userPath/xml/redirect.xml")); @fclose($fileID); // XML PARSE
5
1806
by: 2291980 | last post by:
Hello can any body tell me the dff between function redirect($url) { echo "<script>"; echo "window.location='".$url."'"; echo "</script>";
3
1322
by: onlysaket | last post by:
I wanted to redirect to another page if login info is valid i m using php and ajax
9
4340
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case). The browser then makes a new request to the server to redirect itself to abcd.asp after which the user gets redirected to abcd.asp. But in case of Server.Execute (or Server.Transfer), when the server
1
4348
George Lft
by: George Lft | last post by:
ok, first of all, i built my register page using dreamweaver tool which the codes haven been out of control. Now i'm thinking that turning over everything - by using this another set of codes. And these new sets of codes have overwhelmed me a bit. Here's the new code: CREATE TABLE `users` ( `ID` int(11) NOT NULL auto_increment, `Username` varchar(255) NOT NULL, `Password` varchar(255) NOT NULL, `Temp_pass` varchar(55)...
13
2018
by: Adhal | last post by:
Hi, How can I stop hotlinking to a specific file, and I want it to redirect it to a PHP link so I can monitor the number of downloads. Here is my site with the download page: http://www.adhal.org/software/downloads.htm And here is softpedia directly connecting to my file and bypassing the counter php. http://www.softpedia.com/get/File-managers/HashNET.shtml
0
8379
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
8816
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
8596
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7309
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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
5627
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
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
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.