Topic: Page Caching Issues with URL's with trailing slash

OK, truly hoping that someone here knows the answer to this issue.

While 'testing' out Page Caching on a site I have a URL like this:

domain.com/info

When I add a / (trailing slash) to the URL the page is regenerated & cached again, but never picked up as cached, ie; each request re-caches the page again.

What am I doing wrong ??

Also, why does the Page Caching not store files as  /info/index.html ?? ie: <:controller_name>/<:action_name>.ext  instead of as /info.html


My code looks like this:

class InfoController < ApplicationController
  caches_page :index

  def index
  end
end


In /config/environments/production.rb I have the following:

config.action_controller.page_cache_directory = File.join(RAILS_ROOT, 'public', 'cache')

My .htaccess file looks like this:

....
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
# RewriteRule ^([^.]+)$ cache/$1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule !^/cache/(.*) - [C]
RewriteRule ^(.*)$ /cache/$1 [QSA]
.....