I've been trying to figure a way of rewriting a url to direct anything *.php to index.php, which Ive managed to do by using:-
RewriteRule ^(.+)/(.+).php index.php?section=$1&file=$2 [nc]
RewriteRule ^(.+).php index.php?file=$1 [nc]
which by navingating to test3.php redirects to index.php?file=test3 and /sub/test3.php navigates to index.php?section=/sub/&fi
However what I want to do is append the parameters passed to the page, so for example navigating to test3.php?param=27 redirects to index.php?file=test3¶m
=27 , so what Ive done is the following:-
RewriteRule ^(.+)/(.+).php?(.+) index.php?section=$1&file=$2&$3 [nc]
RewriteRule ^(.+).php?(.+) index.php?file=$1&$2 [nc]
But it doesnt seem to append the parameters correctly, and I cannot figure out where Im going wrong.
Anyone know of a possible solution?