I'm having a particularly lousy morning right now, because of something I can't explain. On my testserver, I have two directories. In the first directory, the rewriterule works, in the second it doesn't. Any ideas why?
=== dir1
= .htaccess
RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)[/]?$ index.php?group=$1&page=$2 [L]
= index.php
...
$MenuGroupID = (isset($_GET["group"]) ? getCleanString($_GET["group"]) : 1);
$PageID = (isset($_GET["page"]) ? getCleanString($_GET["page"]) : 1);
...
=== dir2
= .htaccess
RewriteEngine On
RewriteRule ^([^/]*)[/]?$ index.php?page=$1 [L]
= index.php
...
echo $_GET["page"];
...
Note the 'getCleanString' function just cleans up my user/querystring input in the first, older example. The second example prints "index.php" when I go to
http://testserver/dir2/test/ while i want it to return "test".