ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Redirect To based on Username

July 05, 2011 8:28pm

Subscribe [3]
  • #1 / Jul 05, 2011 8:28pm

    Jeri Letman

    23 posts

    I’m trying to redirect to a landing page url that contains the user’s username. So far no luck.

    Is this not possible?

    Thanks.

  • #2 / Jul 06, 2011 6:09am

    Matt:P

    277 posts

    Hi Jeri

    Do you realise that once a member is logged in, EE know’s who they are and can display specific content accordingly?

  • #3 / Jul 06, 2011 12:53pm

    Sue Crocker

    26054 posts

    Thanks for the assist, Matt.

    Jeri, when you say redirect to something with their username in it, what did you have in mind?

  • #4 / Jul 06, 2011 1:52pm

    Jeri Letman

    23 posts

    Hi Jeri

    Do you realise that once a member is logged in, EE know’s who they are and can display specific content accordingly?

    Hi Matt,

    I absolutely realize that. I use that all the time.

    Unfortunately, in this case I need to have the username in the url immediately after they login.

    That’s what I’m wondering if it’s possible.

    i.e. they end up http://www.domain.com/index.php/u/username

    Thanks.

  • #5 / Jul 06, 2011 2:04pm

    Matt:P

    277 posts

    Hi Sue and Jeri

    I understand Jeri. What do you intend to display on the page once the user has logged in? Could you give us more of an overall picture of what you have in mind.

    —- temporary answer attempt ...

    How about an {if} statement in the <head> which checks to see if the visitor is logged in. If they are it could redirect them to their ‘user home page’ .../u/username

    {if logged_in}
    <meta http-equiv="refresh" content="0;url={site_url}u/{username}/">
    {/if}
  • #6 / Jul 06, 2011 2:17pm

    Sue Crocker

    26054 posts

    Looks like a great solution, Matt. Jeri - whatcha think?

  • #7 / Jul 11, 2011 8:12pm

    Jeri Letman

    23 posts

    HI Matt & Sue,

    Was away and just got back and read this post.

    From what I see of Matt’s solution, I think that would likely work.

    I’ll give it a try.

    Thanks.

  • #8 / Jul 12, 2011 8:01am

    Sue Crocker

    26054 posts

    Sounds good, Jeri. If anything else comes up, please do let us know in a new thread..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases