Hey Frank,
2016-05-26 23:34 GMT+02:00 K. Frank <kfrank2...@gmail.com>:
> On Thu, May 26, 2016 at 5:00 PM, Rutger ter Borg <rut...@terborg.net>
> wrote:
> > Hey all,
> >
> > I'm running a Wt application through wthttpd. It's deployed at '/'. In
> > order to get clean URLs, I configured --docroot to also list the
> > directories of static content.
> >
> > This works, Wt is deployed at '/'. All URLs are clean, except for the
> > one referring to the site's root. So, generated hrefs from an
> > InternalPath set to '/' shows up as '/?'.
> >
> > domain.com/?
> > domain.com/about
> > domain.com/login
> > domain.com/the/rest/is/clean
>
We cannot reproduce the '/?' issue. Can you reproduce this misbehaviour in
a small test case?
For example, on the wt homepage, this works: the languages menu has a link
to internal path '/' for the English language.
> I am still uncertain how static content, URLs, InternalPath, and
> --docroot all work together.
>
It's confusing, for sure, but let me try to explain in summary:
1) static content are files which are offered verbatim, by a web server, to
a web browser, by translating an incoming request URL to a file on the file
system. When deploying with wthttpd, the translation is done by considering
the --docroot. The docroot is the folder which contains your static
contents, and Wt will translate an incoming request of
http://myserver.com/this/url/file.txt to a file on the system within the
docroot folder: {docroot}/this/url/file.txt
2) an application is deployed at a certain URL, e.g. the Wt homepage is
deployed at '/wt' inside http://www.webtoolkit.eu/. URLs within the '/wt'
are also handled by this application. For example
http://www.webtoolkit.eu/wt/blog is handled by this application, and the
corresponding internal path is '/blog'.
There is one particular problem which leads to 'ugly URLs', namely if you
deploy your application at '/', i.e. the root of your server. Then Wt
cannot decide which URLs should be considered a request for a static file,
or a request for an internal path inside your application. To avoid
misbehavior, Wt resolves this by using a different syntax for 'internal
paths' in this case: /?_=/internal/path instead of /internal/path, leaving
all other requests to be for static files. This can be solved by indicating
to the web server specifically which URLs should be considered as static
file request: --docroot='.;/css,/html,/resources'. With this specification,
a request for http://mywebserver.com/css will be handled as a static file
request, served from within the docroot, while any other URL not listed,
like http://mywebserver.com/some/path, will be handled by your application.
Koen
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest