Hi all,
I implemented updateUrl, updateRoot and initialRequest so I can take care of the URLs in my project. Specifically, as I am working with rewrites, I hide my "app name" configured in seaside.
As an example, a "normal" link would be: mydomain.com/my_app_name/?_s=XX&_k=YY. By implementing updateRoot, initialRequest, updateUrl and rewrites in nginx's config, I am successful in completelly remove my_app_name from all links in all the site except one place.
Inside updateRoot: I put custom CSS via aHtmlRoot addStyle: ( "My CSS code" ), and it works, but the link is generated with "my_app_name" in it.
Any way to handle that URL generation so I can hide it there also?
Thanks
On Thu, Jul 16, 2015 at 6:28 PM, David stormbyte@gmail.com wrote:
Hi all,
I implemented updateUrl, updateRoot and initialRequest so I can take care of the URLs in my project. Specifically, as I am working with rewrites, I hide my "app name" configured in seaside.
As an example, a "normal" link would be: mydomain.com/my_app_name/?_s=XX&_k=YY. By implementing updateRoot, initialRequest, updateUrl and rewrites in nginx's config, I am successful in completelly remove my_app_name from all links in all the site except one place.
The following approaches would probably be simpler - set the #requestHandler: on your server adaptor to you application instead of the default dispatcher - set #defaultName: on the default dispatcher to 'my_app_name'
This way you don't have to implement #updateRoot #initialRequest and #updateUrl
Cheers Philippe
El Fri, 17 Jul 2015 10:59:16 +0200 Philippe Marschall philippe.marschall@gmail.com escribió:
On Thu, Jul 16, 2015 at 6:28 PM, David stormbyte@gmail.com wrote:
Hi all,
I implemented updateUrl, updateRoot and initialRequest so I can take care of the URLs in my project. Specifically, as I am working with rewrites, I hide my "app name" configured in seaside.
As an example, a "normal" link would be: mydomain.com/my_app_name/?_s=XX&_k=YY. By implementing updateRoot, initialRequest, updateUrl and rewrites in nginx's config, I am successful in completelly remove my_app_name from all links in all the site except one place.
The following approaches would probably be simpler
- set the #requestHandler: on your server adaptor to you application
instead of the default dispatcher
- set #defaultName: on the default dispatcher to 'my_app_name'
This way you don't have to implement #updateRoot #initialRequest and #updateUrl
Cheers Philippe
Thanks for your response. The implementation of the initialRequest + updateUrl and updateRoot is not only for that, it is also to maintain a SEO friendly links across pages.
seaside@lists.squeakfoundation.org