hi, i have created a redirection controller for redirect old pages of
another previous site:
####### start code ######
class RedirectController < ApplicationController
def index
headers["Status"] = "301 Moved Permanently"
if params[:url]
redirect_to params[:url]
return
else
redirect_to index_path
end
end
end
####### end code ######
in the routes.rb i have setting this rules:
####### start code ######
map.connect '/index.htm', :controller => 'redirect'
map.connect '/modules.php?name=News&file=pdf&sid=87', :controller =>
'redirect'
####### end code ######
for the first rule (index.htm) the redirection woks fine, but on second
rule the redirection don't success.
what if the correct syntax i doing to use for my purpose?
thanks
--
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.