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.

Ignore a url segment?

November 29, 2007 9:53pm

Subscribe [3]
  • #1 / Nov 29, 2007 9:53pm

    asarbogast

    14 posts

    I have a client that wants to use EE to serve different content to different types of users. Easy enough.  However, the way they distinguish between different types of uses is via the url that is returned by a different site after users log into that site. So for example, when they get to the EE site, their url will be http://mysite.com?eID=IQ00000123456. The last 9 numbers will be unique to each user, and the type of user is determined by the first 2 letters after the = sign—they can either be IQ, MQ, or CQ.

    I can have them return the url in any number of ways—it could be http://mysite.com/?eID=IQ00000123456/index.php or http://mysite.com/index.php/?eID=IQ00000123456, for example.

    I am at a loss as to how to make this work with EE. Is there a way to ignore a url segment in terms of templating but still grab information from it to serve up conditional content?

  • #2 / Nov 29, 2007 10:25pm

    Sue Crocker

    26054 posts

    Andrea, I’m not certain either. Let me ask the rest of the team and see if they have any ideas.

  • #3 / Nov 30, 2007 12:22am

    asarbogast

    14 posts

    Thanks Sue!

  • #4 / Nov 30, 2007 8:19am

    Derek Allard

    3168 posts

    Hey asarbogast, sounds like an interesting project.  The first thing that comes to mind for me, and what would be the easiest solution, would be to create a standalone “landing” page.  The landing page need not even be in EE, but certainly could be.  It would basically be

    // pseudo-code
    $the_segment_identifier = read from url
    
    if ($the_segment_identifier == 'something') {
        redirect("to_appropriate_template");
    } elseif ($the_segment_identifier == 'something else') {
        redirect("to_appropriate_other_template");
    }

    Rinse and repeat. 

    Would that work for you?  Otherwise, out of the box EE doesn’t do what you describe, and you’d have to code your own solution or hire someone to do so.

  • #5 / Nov 30, 2007 2:26pm

    asarbogast

    14 posts

    Hi Derek,

    That is a good idea, and sounds like it may work. I will give it a try tonight and see what I can do.

    Thanks,

    Andrea

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

ExpressionEngine News!

#eecms, #events, #releases