Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8789081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:18:15+00:00 2026-06-13T22:18:15+00:00

My site is here . It used to be a Django-powered blog. However I

  • 0

My site is here.

It used to be a Django-powered blog. However I no longer update it so I just wanted to make it a static HTML site. I wget’ed it and moved it to Heroku with Ruby Rack.

However every URL resolves to the home page. This is because of my config.ru file:

use Rack::Static, 
  :urls => ["/media/images", "/media/js", "/media/css"],
  :root => "public"

run lambda { |env|
  [
    200, 
    {
      'Content-Type'  => 'text/html', 
      'Cache-Control' => 'public, max-age=86400' 
    },
    File.open('public/index.html', File::RDONLY)
  ]
}

Question: Is there a way to map multiple URLs? e.g. foo.com/about maps to public/about/index.html, foo.com/posts/2012/oct/21/blog-postmaps to public/posts/2012/oct/21/blog-post/index.html

At this point I’d even be fine typing each one by hand.

Thanks for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:18:16+00:00Added an answer on June 13, 2026 at 10:18 pm

    For now I found the best answer to be:

    use Rack::Static, 
      :urls => ["/media/images", "/media/js", "/media/css"],
      :root => "public"
    
    map "/" do
      run lambda { |env|
      [
        200, 
        {
          'Content-Type'  => 'text/html', 
          'Cache-Control' => 'public, max-age=86400' 
        },
        File.open('public/index.html', File::RDONLY)
      ]
    }
    end
    
    map "/portfolio" do
      run lambda { |env|
      [
        200, 
        {
          'Content-Type'  => 'text/html', 
          'Cache-Control' => 'public, max-age=86400' 
        },
        File.open('public/portfolio/index.html', File::RDONLY)
      ]
    }
    end
    

    And map every URL to its respective file. Tedious, but works. See also the answer to this question regarding URL variables. Couldn’t get it to work for me though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing this site here for a client of mine: http://test.bebiafricanhairbraiding.com/osa/index.html I've encountered a
I have a fixed footer on my site here: http://starprovisions.com/dev/bacchanalia.html On my 1360x768 screen
So I just changed the PageControl project from Apple's site here . The issue
I have a site that I'm creating, part in static HTML, the other part
Ok very weird issue here. In the base.html file for the admin site they
Site here . Why is it that the code works for $('#club').change(function(event) but not
You can view my site here - http://patiss-themes.com/planetary/ and as you can see on
My test site here is working fine I believe (haven't tested it in all
We have a Joomla 1.5 site here : http://printversal.com It got hacked last night.
I'm working on a site here where I include parts of the site that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.