# Routes or .htaccess?

**URL:** <https://www.ruby-forum.com/t/routes-or-htaccess/131432>\
**Category:** Rails\
**Created:** [March 10, 2008, 12:49am UTC](https://www.ruby-forum.com/t/routes-or-htaccess/131432 "2008-03-10T00:49:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clouder](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/0ea827/32.png) [@clouder](https://www.ruby-forum.com/u/clouder)\
**Post date:** [March 10, 2008, 12:49am UTC](https://www.ruby-forum.com/t/routes-or-htaccess/131432/1 "2008-03-10T00:49:47Z")

</div>

I want to make a route that catches anything ending in /login ie  
[mysite.com/login](http://mysite.com/login), [mysite.com/item/1/login](http://mysite.com/item/1/login) etc. Any url ending with /  
login will use the same controller and action to allow the user to  
login. Is this best done with routes, .htaccess, or something else?
