I know there've been a lot of posts on mod_rewrite, and yeah, i've read through a lot of them. anyways, i've got a bunch of questions.
i'm trying to change a url address like "page/1" to "page.php?id=1". and this is what i placed in my .htaccess file.
RewriteEngine on
RewriteRule ^page/([0-9]+)/?$ page.php?id=$1 [L]
ok, it works fine. question is, when i try to output $id or $_GET['id'], nothing shows up. i figured a workaround this problem would be to get the url address, 'explode' it and get the url variables from that. but i thought that since page/1 is actually page.php?id=1, the url variables are still kept??? (when i type in page.php?id=1 and output $id, it works fine, not page/1).
my second problem is this. when i deleted the htaccess file, it still does the mod_rewrite! i've tried logging in with a telnet ssh client to delete it, but there's no such file. when i try to upload another htaccess file in the same directory with say another mod_rewrite command such as:
RewriteRule ^test/([0-9]+)/?$ page.php?id=$1 [L]
test/1 will not pick up page.php?id=1! but if i add a new page, say
RewriteRule ^test/([0-9]+)/?$ test.php?id=$1 [L]
test/1 start working. but then it won't stop working when i delete the htaccess file. what's wrong? is it cached in a file somewhere???
by the way, i do not have access the apache config file since i'm on a shared server.
Thanks for all your help






Bookmarks