On 30/04/14 13:54, Moritz Lennert wrote:
On 29/04/14 13:54, Eric Covener wrote:On Tue, Apr 29, 2014 at 7:44 AM, Moritz Lennert <mlennert@xxxxxxxxxxxxxxxxxxx> wrote:I have trouble understanding the entire process of internal redirection and rewriting. I imagine that this is some simple configuration (RewriteBase ?) that needs to be added/changed, but I just can't wrap my head around it. Could someone give me pointers to where to look for the solution (and yes, I've read though the page on mod_rewrite, but this hasn't put me on the right path, yet) ?Generally you shouldn't put your rewrites in <directory>. It delays their execution and makes them more complicated (every rewrite results in an internal redirect). If you are in <directory> or use [PT], you usually want to rewrite from URL to URL not URL to filesystem path. These might simplify things so much that you can sort out whatever is wrong. When you move from <directory> context, you'll have to change your rules a little bit because you'll be matching against the entire URL, beginning with /.Thanks to Eric and Oscar for the tips. I've moved the RewriteRules outside <directory>, both before and after (I didn't see any difference). I still have the same issue. But I've come a bit further: Actually, the rewrite rule concerning balades: RewriteRule ^balades/(.+)$ /qgiswebclient.html?map=/home/geogf405/PROJETS/$1.qgs [PT,L] Does result in a the returning of qgiswebclient.html. In that page, however there are a lot of references to css and javascript files such as: libs/ext/resources/css/ext-all-notheme.css js/GlobalOptions.js Looking in the logs, I see things like init rewrite engine with requested uri /balades/libs/ext/resources/css/ext-all-notheme.css, referer: http://example.com/balades/moritz and then rewrite '/balades/libs/ext/resources/css/ext-all-notheme.css' -> '/qgiswebclient.html?map=/home/geogf405/PROJETS/libs/ext/resources/css/ext-all-notheme.css.qgs', referer: http://example.com/balades/moritz I've resolved this by making all these links absolute by adding a slash at the beginning: /libs/ext/resources/css/ext-all-notheme.css /js/GlobalOptions.js etc Now I get a step further and can actually see qgiswebclient.html beginning to load in the browser, but then I get an error message (from the page) telling me that some startup parameters are missing. This is apparently because only qgiswebclient.html is called, but without the map=/home/geogf405/PROJETS/$1.qgs part. In the logs (complete logs attached) I see: rewrite '/balades/moritz' -> '/qgiswebclient.html?map=/home/geogf405/PROJETS/moritz.qgs' split uri=/qgiswebclient.html?map=/home/geogf405/PROJETS/moritz.qgs -> uri=/qgiswebclient.html, args=map=/home/geogf405/PROJETS/moritz.qgs and then ( forcing '/qgiswebclient.html' to get passed through to next API URI-to-filename handler ) OR ( local path result: /qgiswebclient.html prefixed with document_root to /home/geogf405/qgis-web-client/site/qgiswebclient.html ) depending on whether I set [PT] or not. But in both cases the args part seems to get lost. I have the feeling I'm getting very close, but can't see the next step. Moritz --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx