I’m setting up a website with Mongrel. One of the requirements is for
URLs to be redirected to different files than they usually would,
e.g.:
http://example.com/users/show/123-king-kong
Would actually look for the cached file:
public/users/show/123.html
And not:
public/users/show/123-king-kong.html
as it normally would.
How would I set up such redirection with Mongrel?
Thanks in advance,
Maurice B. Gladwell
On Jul 5, 7:03 am, “Maurice G.” [email protected]
wrote:
http://example.com/users/show/123-king-kong
Would actually look for the cached file:
public/users/show/123.html
And not:
public/users/show/123-king-kong.html
How would I set up such redirection with Mongrel?
I could be wrong, but I’m not sure that you can do this within mongrel
itself. Do you have something like Apache or nginx running in front of
mongrel? If so, it might be easiest to handle this at that layer. The
additional benefit is that, since you would seem to be serving a
static file anyway, you don’t have to involve mongrel/ruby in the
serving of the file (which means your performance would increase
greatly).
–
Regards,
John W.
I just finished setting this up. The easiest thing to do is read:
http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/
which explains pretty much everything. The meat of the apache
configuration is in section 3.
Kevin
On Jul 5, 10:03 am, “Maurice G.” [email protected]