Can't understand Rewrite behaviour

Can't understand Rewrite behaviour

Posted by: Erichero
Posted on: 2008-02-20 02:58:00

Hi. I've been trying to install the Mantis bug tracking system which uses PHP. Our main website runs Rails.

I included a rewrite in .htaccess and things were working fine, then all of a sudden I'm getting 404 errors on all the PHP files except a handful.

My rewrite rules look like:

RewriteCond %{REQUEST_URI} ^/blog.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/habanero/forum.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/habanero/wiki.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html).*$ [NC]
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/support.*
RewriteRule .* - [L]
RewriteCond %{REQUEST_URI} ^/support/mantis.*
RewriteRule .* - [L]

There is no ruby stuff involved in support and going to that directory itself just lists its contents. Oddly enough some files like /support/mantis/admin/check.php still come through. There production.log error I'm getting is:

ActionController::RoutingError (no route found to match "/support/mantis/login_select_proj_page.php" with {:method=>:get}):
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/routing.rb:1325:in `recognize_path'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/routing.rb:1315:in `recognize'
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/dispatcher.rb:40:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/fcgi_handler.rb:168:in `process_request'
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/fcgi_handler.rb:143:in `process_each_request!'
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/fcgi_handler.rb:109:in `with_signal_handler'
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/fcgi_handler.rb:142:in `process_each_request!'
/usr/lib/ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/ruby/1.8/fcgi.rb:597:in `each'
/usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/fcgi_handler.rb:141:in `process_each_request!'
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/fcgi_handler.rb:55:in `process!'
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/fcgi_handler.rb:25:in `process!'
dispatch.fcgi:24


Any thoughts?

Re: Can't understand Rewrite behaviour

Posted by: Erichero
Posted on: 2008-02-20 06:38:00

Never mind. I made some adjustments to the .htaccess, but the problem really seemed to be some old cookie that was disrupting the site.

Tags: rewriterulerequest urilog errorphp filesrewritehtaccesshandfulrubywikirewritecondblogrewriterulerequest urilog errorphp filesrewritehtaccesshandfulrubywikirewritecondblog