Blog as root route

edited April 2013 in Modules
Hi guys,

How can I make /blog as my root route?
So / is the same as /blog
and /2013/04/23/hello-world is the same as /blog/2013/04/23/hello-world.

Thanks!

Comments

  • edited 1:30PM
    Does it work for you when you change the default_controller route to 'blog' instead of 'fuel/page_router'?
    $route['default_controller'] = 'blog';
  • edited 1:30PM
    Hi,

    Nope. It does not works.
  • edited April 2013
    Hmm... it seems to work for me at first glance. Is this 0.93 or the 1.0 beta? Also, when you say it doesn't work, do you mean that it simply still just displays the homepage?
  • edited April 2013
    Hi,

    It is 0.93 and yes it simply displays the homepage.
  • edited 1:30PM
    Hmm.. that appears to be an issue with 0.93 but not for 1.0 and am uncertain at this point if it is the version of CI being used or the HMVC modular separation piece of it. Sorry, but I think at this point, your best bet is to either upgrade to 1.0 and try it out or to put in a redirect to go to /blog. Here is one post on the upgrade process that may help:

    http://www.getfuelcms.com/forums/discussion/1163/update-from-0.93-to-1.0/#Item_3
  • edited 1:30PM
    I'll give 1.0 a run. Thanks
  • edited 1:30PM
    It works on 1.0. I'll be working on 1.0 then.

    Thanks!
  • edited April 2013
    Hi,

    I succeded to make /blog as root route.

    Now, how can I change /blog/2013/04/24/manchester-united-claim-their-20th-premier-league-title

    to

    /news/2013/04/24/manchester-united-claim-their-20th-premier-league-title

    I already change the module URI from the admin but then the later link gave me 404 page.

    Thanks in advance for your advice.
  • edited 1:30PM
    The settings change is used to control what the generated links display. The last step is to create the route in your route file like so:
    $route['news'] = 'blog';
  • edited 1:30PM
    It works. Thank you
Sign In or Register to comment.