cloudhead / toto

the 10 second blog-engine for hackers
MIT License
1.49k stars 244 forks source link

When setting up using a sub folder like Blog the home URL doesn't work #49

Open MarkNijhof opened 14 years ago

MarkNijhof commented 14 years ago

When setting up using a sub folder like Blog the home URL doesn't work, so navigating to .../blog/ results in the toto 404 (so the app runs fine) only when you navigate to .../blog/index it works. Navigating to the different blog posts works fine as well. I used the description in the Wiki to make it run with rails, I'll be using Padrino but that doesn't really matter here.

I hope I have explained it correctly?

Cheers,

-Mark

MarkNijhof commented 14 years ago

Oh right forgot, if you don't add the prefix option then all links to the different posts won't be going from the new defined root but instead from the actual site root /

weatheredwatcher commented 13 years ago

I am having this same issue. I am running toto on heroku as an integrated part of my existing site. Any progress on this?

MarkNijhof commented 13 years ago

Hey,

http://cre8ivethought.com/blog/2010/12/06/good-bye-toto-hello-dorsey/

And the most up to date code is here: https://github.com/MarkNijhof/Cre8iveThought

Let me know if you need help, your content should still be good.

Cheers,

-Mark

On 8 mei 2011, at 19:48, weatheredwatcher reply@reply.github.com wrote:

I am having this same issue. I am running toto on heroku as an integrated part of my existing site. Any progress on this?

Reply to this email directly or view it on GitHub: https://github.com/cloudhead/toto/issues/49#comment_1119711

weatheredwatcher commented 13 years ago

Awesome. Thanks for the response! I had already figured it out and was about to post a solution!! I think that for the time being, I'll keep playing around with toto....but your solution seems good too!

For those that might experience this issue:

There is a typo in the config.ru file that is given to integrate toto into your site.

In addition to adding the set prefix as Mark describes, you also need to set :root, 'index' and not 'blog'

Anyway. All is working now, so cheers! And Mark, I certainly will take a closer look at your code in the future!!

ixti commented 13 years ago

Not sure was it in past or not, but latest version of toto has no problems, just put in your toto config:

  # ...
  set :prefix, "foobar"
  # ...

and then run toto under specified path:

map "/foobar" do
  run toto
end

And all paths work like a charm. Anyway original author found his own solution, so I assume that issue can be closed.