# Re-post: Problem with dashes in URL / Routes

**URL:** <https://discuss.rubyonrails.org/t/re-post-problem-with-dashes-in-url-routes/7459>\
**Category:** rubyonrails-talk\
**Created:** [January 19, 2007, 4:55pm UTC](https://discuss.rubyonrails.org/t/re-post-problem-with-dashes-in-url-routes/7459 "2007-01-19T16:55:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fusemedia](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@fusemedia](https://discuss.rubyonrails.org/u/fusemedia)\
**Post date:** [January 19, 2007, 4:55pm UTC](https://discuss.rubyonrails.org/t/re-post-problem-with-dashes-in-url-routes/7459/1 "2007-01-19T16:55:42Z")

</div>

Hey Guys!

First, I am a complete noob at rails. This is my first attempt at a website using ruby. I've done quite a bit of searching and can't seem to find the answer to this question. I'm sure its something completely obvious I'm missing, lol.

I'm having a little issue getting "link\_to" to generate URL's with "-" instead of "+". Some of my URL's may have a variable on the end that could have spaces ( ie. domain.com/controller/action/some+variable/ ). I would like to replace that "+" with a "-" and then remove the dash before I query the database with that variable. Is it possible to have the routes do this automatically? Would I use a regex with :requirements?

Thanks in Advance, Nick
