# Preventing URLs

**URL:** <https://www.ruby-forum.com/t/preventing-urls/73613>\
**Category:** Rails\
**Created:** [October 25, 2006, 6:38pm UTC](https://www.ruby-forum.com/t/preventing-urls/73613 "2006-10-25T18:38:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Horst\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/aeb1de/32.png) [@Horst\_H](https://www.ruby-forum.com/u/Horst_H)\
**Post date:** [October 25, 2006, 6:38pm UTC](https://www.ruby-forum.com/t/preventing-urls/73613/1 "2006-10-25T18:38:17Z")

</div>

Another newbie question:  
I have a browser based app in RoR where I don’t want to allow any  
actions via  
URL - meaning regardless what URL is typed in (after the server URL part  
of  
course), the same page is shown.

Can I do that with the RoR router? If so, how?

Horst

---

<div class="post-metadata">

**Author:** ![Horst\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/aeb1de/32.png) [@Horst\_H](https://www.ruby-forum.com/u/Horst_H)\
**Post date:** [October 25, 2006, 6:44pm UTC](https://www.ruby-forum.com/t/preventing-urls/73613/2 "2006-10-25T18:44:18Z")

</div>

On 10/25/06, Horst H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> >

Horst,

Off the top of my head this should work:

# routes.rb

ActionController::Routing::Routes.draw do |map|  
map.connect ‘\*’, :controller =\> ‘my\_catch\_all\_controller’, :action  
=\> ‘handle\_it’  
end

Zack
