Topic: Passenger doesn't route php files


I develop a new e-shop for my company and I replace a php based e-shop with ROR.

So, all url have changed.

Before, my urls were like that : … icle=21618
And now, the corresponding url is :

All right.

But now, i want to display a clean error when my customer enter my site using an old link. So i use this in my application.rb :

  rescue_from ActionController::RoutingError, :with => :render_404
  rescue_from ActionController::UnknownAction, :with => :render_404
  def render_404 
    respond_to do |format| 
      format.html { render :file => "#{RAILS_ROOT}/public/404.html.erb", :status => '404 Not Found' } 
      format.xml  { render :nothing => true, :status => '404 Not Found' } 

It's all right, it works when you enter an url like that :

But, when a '.php' appear in the url, it seems that rails doesn't enter in its routing process, it seems that passenger intercept the url and display a bad 404 error ...
You can try it using this url … icle=21618.

Anyone have an idea ?

Cheers !