Apache URL Rewriting weirdness
Posted: Sun Aug 09, 2009 10:35 am
Hi,
I was wondering, how on Earth does Apache do these rewrites, without them being set in apache2.conf file?
My example:
I open the browser and type:
http://server/foo/test
And it shows the test.php page. I want to prevent this.
Because, having:
And trying to visit:
http://server/foo/test/22
doesn't fall into the RewriteRule -> if I print_r($_GET) in test.php, nothing is seen, $_GET is empty.
I was wondering, how on Earth does Apache do these rewrites, without them being set in apache2.conf file?
My example:
Code: Select all
foo/
.htaccess
test.phphttp://server/foo/test
And it shows the test.php page. I want to prevent this.
Because, having:
Code: Select all
RewriteRule ^test/([0-9]{2})$ test.php?projectId=$1 [L]http://server/foo/test/22
doesn't fall into the RewriteRule -> if I print_r($_GET) in test.php, nothing is seen, $_GET is empty.