于是祭起Google海搜,发现有人和我遇到了同样的问题:
the problem lies in here somewhere
with URL http://localhost/index/q we get:-
add path-info postfix: c:/wwwroot/index.php -> c:/wwwroot/index.php/q
strip per-dir prefix: c:/wwwroot/index.php/q -> index.php/q
applying pattern ‘^([^/.]*)$’ to uri ‘index.php/q’
I dont want index.php/q though!!!!! argghhhhh!!!
……
GOT IT!!!!!!!
Bl**dy windows OS
i removed the .htaccess file and http://localhost/phpinfo/x was still doing phpinfo.php
I added a directory called phpinfo and it worked - giving a directory listing
I re-created the .htaccess and voila it worked.
So basically if a directory doesnt exist it looks for a script (.php .html) and then uses that with further parameters sdded to the end of it.
wenn diese aktiviert ist, würde ein request nach /kategorie auch kategorie.php finden, und das kollidiert natürlich mit deiner RewriteRule, weil dort eben mit /kategorie/irgendwas ebenfalls ein “treffer” vorliegt - da kann der server also nicht entscheiden, was jetzt eigentlich gemeint ist.
if this is activated, after/category kategorie.php to also find request, and collides naturally with your RewriteRule, because evenly with/category/something is likewise present there a “hit” - there the server cannot decide thus, what is now actually meant.