# A problem with the routes

**URL:** <https://www.ruby-forum.com/t/a-problem-with-the-routes/105033>\
**Category:** Rails\
**Created:** [May 25, 2007, 3:28am UTC](https://www.ruby-forum.com/t/a-problem-with-the-routes/105033 "2007-05-25T03:28:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Riquelme](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/439d5e/32.png) [@Riquelme](https://www.ruby-forum.com/u/Riquelme)\
**Post date:** [May 25, 2007, 3:28am UTC](https://www.ruby-forum.com/t/a-problem-with-the-routes/105033/1 "2007-05-25T03:28:47Z")

</div>

In many case,the non-standard url will cause the RouteError,and the  
page will show 400.html.  
but in my recently project,I don’t want this be caused,it’s take the  
system resources,and the log file turn big very fast.  
the spider always use ‘XXXX/user.asp’ to cache my page.  
how can I do to write a regexp to redirect this request to a page such  
as ‘error.html’,and will not case the RouteError.

sorry for my poor english…hehe.

---

<div class="post-metadata">

**Author:** ![Riquelme](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/439d5e/32.png) [@Riquelme](https://www.ruby-forum.com/u/Riquelme)\
**Post date:** [May 25, 2007, 6:20am UTC](https://www.ruby-forum.com/t/a-problem-with-the-routes/105033/2 "2007-05-25T06:20:01Z")

</div>

try this:

map.connect “\*anything” , :controller =\> “application” , :action =\>  
“error\_page”
