Hi Eli,
Le vendredi 11 juin 2010 à 10:56 +0200, Eli Green a écrit :
> Is there a way I can have an application respond to the root component?
>
> I want its URL to be
http://hostname/ and returning '' and '/' from
> the path don't work.
No, it's not possible, at least for now. I suggest adding rewrite rules
when deploying your application.
For example, let's say you have an application class with the path
'foo', and you want it to be accessed at
http://www.example.comYou can add a rewrite rule in your front-end server config file.
For Apache, something like this should work:
RewriteEngine On
RewriteRule ^/foo(.*)$
http://www.example.com/$1 [redirect,last]
RewriteCond /path/to/static/files/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$
http://localhost:8080/foo/$1 [proxy,last]
Then you can apply corresponding rewrite rules in Iliad to generate urls
accordingly:
Iliad.ILUrlBuilder addRewriteRule: [:string |
string copyReplacingAllRegex: '^\/foo' with: '
http://www.example.com']
HTH,
Nico