Project

General

Profile

docroot from url

Added by prest1ge c0ding about 8 years ago

Hello hardcoding-community.

Is it possible to grep the docroot from a url?

I was trying the following command lines:

./wtApp ---docroot=http://myFancyWebsite.Xe/docroot

./wtApp ---docroot http://myFancyWebsite.Xe/docroot

./wtApp ---docroot=http://www.myFancyWebsite.Xe/docroot

./wtApp ---docroot=www.myFancyWebsite.Xe/docroot

...

but it tells me something like: Docroot not valid.

The thing is,...

i am developing a big wt application which can be used for all users.

Nevermind admin or default user.

And it will be very nive to handle the docroot as seperate,

to update graphics / images or like scripts and styles 'on the fly'

so the users doesnt need to update the whole application.

Thanks in advance.


Replies (1)

RE: docroot from url - Added by Wim Dumon about 8 years ago

Hey,

Docroot tells the built-in http server where to get files on disk if a URL that is not mapped to an application is accessed. You don't have the obligation to use that feature of Wt. If you make sure that all files your application uses refer to http://myFancyWebsite.Xe/docroot, the wt http server won't serve a single static file. For resources used by Wt, you can set the resourcesURL property in wt_config.xml to this purpose. Alternatively, put a reverse proxy in front of your wt application that redirects all static file accesses to the proper static file server.

Wim.

    (1-1/1)