thank you Andy
i have tryed with : map.connect '/modules.php', :controller =>
'redirect'
but it not wook
i have try with metal too:
####### start code ######
require(File.dirname(__FILE__) + "/../../config/environment") unless
defined?(Rails)
class RedirectOldSite
def self.call(env)
if env["PATH_INFO"] =~ /^\/modules\.php\?name=News&file=pdf&sid=(\d*)/
[200, {"Content-Type" => "text/html"}, ["Hello, World!"]]
else
[404, {"Content-Type" => "text/html"}, ["Not Found"]]
end
end
end
####### end code ######
but it not work too.
i suppose the problem is the .php extension, because if i use the rule:
/^\/modules/
and in the browser i point to mydomain/modules
the rule setting in metal works fine.
any idea?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.