in reply to Ideas on how to redirect users to a specific index

One way to do it would be to use apache rewrite rules to change www.page.com/username/ into www.page.com/script.cgi?u=username. Then you have one script that takes care of everything. I'm sure there are otherways but thats the first thing that came to mind when reading your problem.


___________
Eric Hodges
  • Comment on Re: Ideas on how to redirect users to a specific index

Replies are listed 'Best First'.
Re^2: Ideas on how to redirect users to a specific index
by pg (Canon) on Oct 13, 2004 at 05:19 UTC
    "One way to do it would be to use apache rewrite rules to change www.page.com/username/ into www.page.com/script.cgi?u=username."

    What is the difference? Indeed, they are the same. The information contained in those two URL's are exactly the same, although they visually appear to be different. They both contain the username.

    www.page.com/username/ does not require a seperate physical folder for the username, unless we are saying that URL always matches the path to a file, which is not true. It is all about the logic on the server side, and how it forms content for an URL. There is absolutely no need to map www.page.com/username/ to some file, say index.html, in directory $SERVERHOME/username.

    If he has a piece of logic to deal with www.page.com/script.cgi?u=username, the same logic with very slight modification could be used to deal with www.page.com/username/

      I don't understand what you mean. I was saying that when a user types in http://www.page.com/username/ you can make your server act as if they typed http://www.page.com/script.cgi?u=username. Which kind of sounds like what you are saying. The user still sees page.com/username/ and you get one script to do everything in, which sounds like what the op was requesting.


      ___________
      Eric Hodges