Yeah, that sounds possible. I'll take a shot at it.

-Steven


On Fri, Jul 26, 2013 at 1:55 PM, Brian Craft <craft.br...@gmail.com> wrote:

> Other (not clojure) frameworks do this with middleware that redirects to
> the url + slash when a route lookup fails, and the url has no trailing
> slash.
>
> Is that possible with ring?
>
>
> On Friday, July 26, 2013 10:45:33 AM UTC-7, Reginald Choudari wrote:
>>
>> Thanks for all the replies.
>>
>> Looks like the ring library has a redirect function in ring.util.response
>> namespace.
>>
>> It redirects using the 302 status code.
>>
>> Works for me. Although it is a pain to have to declare a redirect for
>> every route.
>>
>>
>> On Thursday, July 25, 2013 9:08:50 PM UTC-4, Reginald Choudari wrote:
>>>
>>> Hello, I'm trying to figure out what is the best way in handling this
>>> problem.
>>>
>>> Using Ring I have a handlers set to direct routes with relative URI
>>> paths (e.g. "/", "./posts", "/about"). But I would like the URI to be
>>> automatically redirected to "/posts/" and "/about/" with the trailing
>>> slash, so that all my links and references work correctly. If the URI is
>>> without the trailing slash, I'm sure you know what happens to all your
>>> relative paths.
>>>
>>> Any efficient way of dealing with this?
>>>
>>> Thanks,
>>> Reginald
>>>
>>>
>>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to