Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > PHP Development
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-22-2005, 02:36 AM   #1 (permalink)
jimojeda
Junior Member
 
Join Date: Dec 2005
Posts: 1
Arrow Redirect Script help please...

Hello, I need help on creating a redirect script. Now, I'm very detailed to make sure I don't leave any un-answered questions, so here goes...

I need a script that will redirect people in the following way....

Suppose you're an affiliate and you want to promote several differnt products of mine.

Your typical affiliate link looks like this:

http://www.example.com/cgi-bin/affil...cgi?aff=USERID

I already have a script that shortens this down to look like this:

http://www.example.com/g.o/USERID

The only problem is if an affiliate wants to promote any different product than the default, then they have to enter the FULL URL after their USERID and the link looks like this:

http://www.example.com/g.o/USERID/ht...ateWidget.html

So the syntax for the script above goes like this:
http://www.example.com/g.o/USERID/URL

You get what I mean, right? By the way, that g.o file is a perl scrip. I modified the .htaccess file on my server to treat .o extensions as perl scripts.

So what I want is a seperate script, maybe called "t.cgi" or "t.php".

The syntax should look like this:

http://www.example.com/t.php/USERID/PID

The USERID is the username of the affiliate and the PID is the product ID.

Within the script, I should be able to add as many Product ID's and have the script simply add it to the link it will redirect to.

So let's suppose that for Product ID "3", I have it set to redirect to "http://www.othersite.com/golfclubs.html".

Then somewhere in the script, you should leave an area for me to enter a new product ID and the URL it should go to.

When the affiliate promotes the link that looks like this:
http://www.example.com/t.php/USERID/3

Then the script should automatically go to the following link:

http://www.example.com/g.o/USERID/ht...golfclubs.html

However, if an affiliate doesn't enter a product ID, the the script should simply forward them to the default script as long as it inserts their USERID.

In other words, if an affiliate simply promotes:
http://www.example.com/t.php/USERID

The script should redirect them to:
http://www.example.com/g.o/USERID

But if they do add a product ID number after wards, like this:
http://www.example.com/t.php/USERID/PID

Then the script should check within itself to see what the URL for that product ID is and then should redirect using the following syntax:
http://www.example.com/g.o/USERID/URL

Does all this make sense?

Please let me know if we can build it right here to share with anyone else that might need a little script like this.

Sincerely,

Jaime Ojeda
__________________
Boost Your Sales!
This Amazing Affiliate Training Course Will Teach You How To
Take Affiliate Marketing To The Next Level
jimojeda is offline   Reply With Quote
Sponsored Links
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:31 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums