New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apache routing broken #723
Comments
Some more information.
We have the following entries in the Apache httpd.conf file
Navigating to http://localhost/ does not work, log files show
Navigating to http://localhost/abc/ does work, log files show
The original page had a link to a css file |
If you serve static files would be better to use the webserver facilities to do that and not the dmvcframework static files middleware. Just becouse web servers do a very good job doing... well, their job :-) |
The Apache framework used by the underlying web broker has a "feature" where it takes the first segment of the request path and strips this off into the Request.ScriptName property. The remainder of the path is then available via the Request.PathInfo property.
This means if you set up a virtualhost and serve pages directly out of the root then things start to break. In particular the static files routing and the MVCPath attribute based routing are broken.
I have tested this on Apache 2.4 running under Windows - I do not have a Linux machine set up but assume it will be the same.
The root of the problem is in file Web.HTTPD24Impl.pas (part of the Delphi RTL)
The Static files and MVC Routing take the path which in this case will be missing the first segment.
I'll need to think what a possible work around could be.
The text was updated successfully, but these errors were encountered: