Not to be critical, but you must have the world's weakest contract
with this designer... at the very least, they should be willing to
change the links to absolute paths ("/pagename.html") so that the
banner's not *completely* broken.

And a Flash nav banner? What is this, 1999? :)

On a more technical note, I've also run into the problem with legacy
links like this. Another option would be to use mod_rewrite (or
equivalent if you're not on Apache) to rewrite the links into the
correct format.

--Matt Jones

On May 13, 8:09 pm, Dan Sadaka <[email protected]>
wrote:
> I have a site that includes a Flash navigator banner.
> Rather than have the designer go in and change the links ($$), I would
> like to redirect his links to mine.
>
> His links are in the form "pagename.html".
>
> I need each of these links to instead be directed to actions within my
> home controller.
>
> I have done the following:
>
> map.connect "pagename.html",
>   :controller => 'home',
>   :action => 'pagename'
>
> which works fine as long as I was not displaying a page from a
> controller at the time. i.e. I was displaying a page from "public".
> However, as we know, if I was displaying a page from the "step1"
> controller, this mapping would not work since the url is now
> "/step1/pagename.html"
>
> Of course, I could make entries for every controller to handle this but
> what I really want to do is something like
>
> map.connect "^.*pagename.html"
>
> so Rails ignores everything up to the pagename.html part.
>
> I tried using
>
> map.connect "*pagename.html"
>
> but this doesn't work.
>
> Any ideas?
>
> THANK YOU IN ADVANCE,
> Dan
> --
> Posted viahttp://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
-~----------~----~----~----~------~----~------~--~---

Reply via email to