toto icon indicating copy to clipboard operation
toto copied to clipboard

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

Open MarkNijhof opened this issue 15 years ago • 5 comments

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 avatar Aug 01 '10 02:08 MarkNijhof

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 /

MarkNijhof avatar Aug 01 '10 02:08 MarkNijhof

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

weatheredwatcher avatar May 08 '11 17:05 weatheredwatcher

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 [email protected] 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

MarkNijhof avatar May 08 '11 17:05 MarkNijhof

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!!

weatheredwatcher avatar May 08 '11 18:05 weatheredwatcher

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.

ixti avatar Aug 08 '11 23:08 ixti