Re: Best Practice to Create Dynamic URL's- With Username
| From: | Ashley Sheridan | Date: | Mon, 21 Sep 2009 09:55:20 +0000 |
| Subject: | Re: Best Practice to Create Dynamic URL's- With Username | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298220@lists.php.net to get a copy of this message | ||
On Mon, 2009-09-21 at 15:20 +0530, Gaurav Kumar wrote:
> I totally agree with this architecture.
>
> You are correct, I am just in the starting phase of the project and in
> fact still need to define the architecture in detail.
>
> Now the question I asked in my last reply is still to be answered?
>
> Gaurav Kumar
> OSWebstudio.Com
>
> On Mon, Sep 21, 2009 at 3:06 PM, Andrea Giammarchi
> <an_red@hotmail.com> wrote:
>
>
> >
> > Question I was Asked by Andrea- "mod_reqrite or .htaccess is
> the answer, but
> > I wonder why you choose /user/username rather than
> just /username a la
> > twitter."
> >
> > I will be using many other aspects of my users something
> like
> > "/projects/username/"; "/gallery/username/".
>
>
> well, it does not matter if this service is user based.
>
> /username/ #as user home page
> /username/projects/ #as user projects
> /username/gallery/ #as user gallery
> /username/etc ...
>
> it's just a silly point but from user home page you isntantly
> know if user exists and you instantly know subsections
>
> In your way you assume that there is a gallery for that user
> while he could have created only projects, without galleries.
> So one search failed, while to go in the user page I need to
> digit /user/ before, not a big deal but we are in tinyurl and
> bit.ly era
>
> Google Code put simply a /p/ as prefix plus the project name
> plus subsection
>
> /p/myprojname/
> /p/myprojname/wiki
>
> since you are starting now, maybe you could consider this
> semantic alternative, if it suits your requirements.
>
> Regards
>
> > > Thanks,
> > > Ash
> > > http://www.ashleysheridan.co.uk
> > >
> > >
> > >
> > >
>
>
>
> ______________________________________________________________
> check out the rest of the Windows Live™. More than mail–
> Windows Live™ goes way beyond your inbox. More than messages
>
For help with the mod_rewrite, a Google search never goes amiss, first
result I found for 'mod_rewrite example' is
http://www.workingwith.me.uk/articles/scripting/mod_rewrite
. I looked
at it quickly and it does cover what you need.
As for what you get as $_GET parameters, that's entirely up to you, and
as you will see from the above link, it's fairly simple to mess about
with.
Thanks,
Ash
http://www.ashleysheridan.co.uk