URL Redirection Script

Discussion in 'PHP' started by Shane1, Jun 25, 2007.

  1. #1
    I've done some searching but can't seem to find anything good. Any suggestions for a short url script to create a redirection service for users? The only requirements I had in mind were: admin control panel, people can choose their own directory, and directory based rather than subdomain. Free or reasonable cost are fine.
     
    Shane1, Jun 25, 2007 IP
  2. renoir

    renoir Well-Known Member

    Messages:
    237
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    118
    #2
    A permanent redirect is specified in the httpd documentation as a 301 redirect. Temporary redirects use the code 302.

    to learn When To Use Temporary and Permanent Redirects view this redirect guide with code.
     
    renoir, Jun 25, 2007 IP
  3. Datawalke

    Datawalke Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Alternatively you could set up some kind of PHP/Javascript redirect.

    From what it sounds like you want to do you would take this attack plan:
    (Granted, all PHP.)
    -Signup Form -> Database
    -Admin Panel
    -Within it you would have the user create the directory (PHP's mkdir can accomplish this.)
    - Then once that is made, you create a new file named index within that directory that would redirect to the right location.

    Just a guess. If you are looking for someone to do it I'm always open to working/consulting
    -Jim
     
    Datawalke, Jun 26, 2007 IP
  4. Shane1

    Shane1 Active Member

    Messages:
    102
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    68
    #4
    Yes, along those lines, but not something where I have to verify each one. Something like http://doiop.com/
     
    Shane1, Jun 27, 2007 IP
  5. Acecool

    Acecool Peon

    Messages:
    267
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You would need to setup an htaccess file, directing all access of ANY subdomain to a script as X variable..

    The script would then pull data from a database, flatfile or however you want to store the data and then redirect using either a header() function, or you could include the site in a frame to generate revenue.
     
    Acecool, Jun 27, 2007 IP
  6. mojojuju

    mojojuju Peon

    Messages:
    53
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I use http://get-shorty.com/ for redirects on my site and I think it's fabulous. It looks like it could be easily modified for multiple users.
     
    mojojuju, Jun 27, 2007 IP
  7. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #7
    http://www.glype.com/products/urlshrtn/

    Would that work? It gives you the option of subdomain, directory or file based URL formats, so you'd just need to select the directory format during the installation.
     
    rodney88, Jun 28, 2007 IP
  8. Shane1

    Shane1 Active Member

    Messages:
    102
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    68
    #8
    Looks perfect but unfortunately requires PHP5.
     
    Shane1, Jul 3, 2007 IP