Actually, it sounds like you need URL rewriting, not routing.  Routing 
is used to map URLs to controllers and actions.  In the .htaccess or 
Apache config file, I would do something like this:

RewriteRule ^/specialoffer(.*)$ /offers/free_bike$1

Sean

Leon Yeh wrote:
> Hi Sean,
>
> The new routes is not specific to an extension, it is more specific to 
> the instance of my radiant app.
> For example: I need to route: /specialoffer url  to /offers/free_bike page.
>
> In regular rails app, you can just add this into config/routes.rb. 
> However for radiant, it basically load it from either 
> vendor/radiant/config/routes.rb or from gem folder, depends on 
> RADIANT_ROOT.
>
> Is there any way to do this on config/routes.rb ? since it is only 
> applied to only this radiant app and not to the extension ?  I guess I 
> can just write an extension that can redirect to specific pages, but it 
> would be overkill for my app.
>
> Thanks!
>
> Leon Yeh
>
>
>
>
> Sean Cribbs wrote:
>   
>> If you're creating an extension, it's easy to do in the
>> 'define_routes' block of the generated extensions class.  All of the
>> routes from extensions are loaded before the Radiant core routes.
>>
>> Sean
>>
>> On 5/6/07, Leon Yeh <[EMAIL PROTECTED]> wrote:
>>   
>>     
>>> Hello,
>>>
>>> I tried to add a new routes into routes.rb. After reading the file, I
>>> found it to load routes.rb from radiant root. Is there any easy way to
>>> append or combine my routes to the radiant routes. Something similar to
>>> the extension routes handler.
>>>
>>>
>>> Thanks in advance,
>>> Leon Yeh
>>>
>>> _______________________________________________
>>> Radiant mailing list
>>> Post:   [email protected]
>>> Search: http://radiantcms.org/mailing-list/search/
>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>
>>>     
>>>       
>> _______________________________________________
>> Radiant mailing list
>> Post:   [email protected]
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>   
>>     
> _______________________________________________
> Radiant mailing list
> Post:   [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>   

_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to