Hello,
yesterday I've spent couple hours trying to solve pretty simple rewrite problem:
/~user/script/query -> /~user/script.php?query
and couple minutes ago I found out, where the problem was:
The toolserver is apparently set to handle links the way
/~user/script -> /~user/script.php
This global setting causes that it's not simple to solve the problem described above. Two hacks have been found to solve it but one doesn't fit other needs (/~user/script/query -> /~user/scriptwithdifferentname.php?query hack causes that /~user/script.php?query doesn't work anymore because of renaming) and second is pretty nasty (creating of /~user/script directory together with /~user/script.php - that unnecessary and unwantedly doubles the directory's content).
So far I know, .htaccess can override global settings but neither me nor couple of my friends I asked for help know how to override that.
Therefore I would appreciate one of these possibilities: * any suggestion how to override/cancel (preferably complete working set of rules) this behavior * remove this behavior from global settings and create .htaccess in every user's public_html directory with this rule as default (or add it to existing rules, if user already has his .htaccess there)
Thank you for any help.
Regards
Danny B.
Danny B. wrote:
Hello,
yesterday I've spent couple hours trying to solve pretty simple rewrite problem:
/~user/script/query -> /~user/script.php?query
and couple minutes ago I found out, where the problem was:
The toolserver is apparently set to handle links the way
/~user/script -> /~user/script.php
Then, wouldn't /~user/script/query -> /~user/script.php/query ? (ie. getting the information from the PATH_INFO rather on the query string)
second is pretty nasty (creating of /~user/script directory together with /~user/script.php - that unnecessary and unwantedly doubles the directory's content).
Why double the directory content?
script/index.php: <?Php require('../script.php'); ?>
2007/7/31, Platonides platonides@gmail.com:
Then, wouldn't /~user/script/query -> /~user/script.php/query ? (ie. getting the information from the PATH_INFO rather on the query string)
Well, IMO using PATH_INFO is rather painful in comparison to mod_rewrite.
I vote on turning this "feature" off - because of this my fastcgi server didn't want to work properly.
It's easy enough to switch off: add
Options -MultiViews
at the top of your .htaccess, and combine with some funky RewriteRules to get the effect needed :)
--valhallasw
Danny B. wrote:
Merlijn van Deen wrote:
It's easy enough to switch off: add
Options -MultiViews
at the top of your .htaccess, and combine with some funky RewriteRules
to
get the effect needed :)
--valhallasw
Thanks, but it did not work.
Wouldn't it be possible to (in theory) rewrite back the rules? e.g. RewriteRule script.php /~username/script/ ?
Platonides wrote:
(...)
second is pretty nasty (creating of /~user/script directory together with
/~user/script.php - that unnecessary and unwantedly doubles the directory's content). Why double the directory content?
script/index.php: <?Php require('../script.php'); ?>
(...)
Doubling of content in parent dir:
I want to have ~/public_html with ONLY script.php in it, NOT script.php AND script/ directory containing the index.php you wrote about above
toolserver-l@lists.wikimedia.org