Mirror url

This is a discussion on Mirror url within the PHP General forums, part of the PHP Programming Forums category; Hi, My client wants an affiliate system developed. I already have an affiliate system that works, but I need to ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-12-2006
Peter Lauri
 
Posts: n/a
Default Mirror url

Hi,



My client wants an affiliate system developed. I already have an affiliate
system that works, but I need to extend it a little.



My client want that the affiliate like should be something like:
www.domain.com/rosegarden where rosegarden is the affiliates choosen
affiliate tracking.



1. I have a script that creates the folder rosegarden and copy
index.php file into that folder that contains the tracking script and then
just redirect them back to www.domain.com <http://www.domain.com/>
2. I can use ModRewrite or something like that. But I have never used
that before, and I am curious of how difficult it would be to create a
dynamic system for this.



When the affiliate signs up they can choose their subfolder and the system
will automatically create necessary files and copy them.



Am I clear of what I want to accomplish?



Best regards,

Peter Lauri








Reply With Quote
  #2 (permalink)  
Old 09-12-2006
Stut
 
Posts: n/a
Default Re: [PHP] Mirror url

Peter Lauri wrote:
> My client wants an affiliate system developed. I already have an affiliate
> system that works, but I need to extend it a little.
>
> My client want that the affiliate like should be something like:
> www.domain.com/rosegarden where rosegarden is the affiliates choosen
> affiliate tracking.
>
> 1. I have a script that creates the folder rosegarden and copy
> index.php file into that folder that contains the tracking script and then
> just redirect them back to www.domain.com <http://www.domain.com/>
> 2. I can use ModRewrite or something like that. But I have never used
> that before, and I am curious of how difficult it would be to create a
> dynamic system for this.
>
> When the affiliate signs up they can choose their subfolder and the system
> will automatically create necessary files and copy them.
>


Ok, 1 is pure evil, 2 is overkill. My suggestion would be multiviews. If
you're using Apache (I assume you are since mod_rewrite is an option),
enable multiviews on the vhost and then create a file called a.php in
the root of the site. Affiliates link to (as your example)
/a/rosegarden. In a.php, grab $_SERVER['REQUEST_URI'], remove the /a/
from the start of it, what's left is the affiliate identifier. Process
as you like.

-Stut
Reply With Quote
  #3 (permalink)  
Old 09-12-2006
Peter Lauri
 
Posts: n/a
Default RE: [PHP] Mirror url


-----Original Message-----
From: Stut [mailto:stuttle@gmail.com]
Sent: Tuesday, September 12, 2006 3:11 PM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [php] Mirror url

Peter Lauri wrote:
> My client wants an affiliate system developed. I already have an affiliate
> system that works, but I need to extend it a little.
>
> My client want that the affiliate like should be something like:
> www.domain.com/rosegarden where rosegarden is the affiliates choosen
> affiliate tracking.
>
> 1. I have a script that creates the folder rosegarden and copy
> index.php file into that folder that contains the tracking script and then
> just redirect them back to www.domain.com <http://www.domain.com/>
> 2. I can use ModRewrite or something like that. But I have never used
> that before, and I am curious of how difficult it would be to create a
> dynamic system for this.
>
> When the affiliate signs up they can choose their subfolder and the system
> will automatically create necessary files and copy them.
>


Ok, 1 is pure evil, 2 is overkill. My suggestion would be multiviews. If
you're using Apache (I assume you are since mod_rewrite is an option),
enable multiviews on the vhost and then create a file called a.php in
the root of the site. Affiliates link to (as your example)
/a/rosegarden. In a.php, grab $_SERVER['REQUEST_URI'], remove the /a/
from the start of it, what's left is the affiliate identifier. Process
as you like.

-Stut

----------------------

That sounded simple, will take a look at it.

Best regards,
Peter
Reply With Quote
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

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



All times are GMT +1. The time now is 03:55 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0