Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Fuel routing question
  • Hi I asked this Kohana question on StackOverflow: --
    I've been thinking how to make something like this in Kohana: domain.com/variable the "variable" is the identifier for a user. So, is this possible? http://domain.com/username/controller/action If yes, can you point me to the right direction, please? Thanks. -- Got this answer (which I believe is correct)
    http://stackoverflow.com/questions/3545145/kohana-2-3-3-routing What's the corresponding Fuel route settings that's equivalent to that one?
  • is it support full domain ,
    like a.com b.com to show not the same content.
  • one of two ways you could build dynamic routing or you could do something like this
    '(:any)'      => 'page/view$1',
    
    this will allow any url to use the page view controller/action. If you need to still define other routes do this
     'home'      => 'page/home',
     'about'      => 'page/about',
     '(:any)'      => 'page/view$1',
    

    The key thing to remember is routing is accessed in order so if you use (:any) before a declared route ie home; then it will follow the route of any instead of home. For more info check out http://docs.fuelphp.com/general/routing.html
  • Thanks. Will try this out.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion