webosb
09-14-2007, 04:07 PM
I'm having trouble making my page pick up $_GET vars. I'm thinking it is the .htaccess file causing this.... I'm trying to make it be able to pick up if def=1 or not... i.e. http://www.foo.com/?def=1
right now, my htaccess looks like this:
RewriteEngine on
RewriteRule ^([A-Z0-9]{6})/?$ main.php?rid=$1&cid=8 [L]
RewriteRule ^user/([A-Z0-9]{6})/?$ user.php?uid=$1&cid=8 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ main.php?cid=8
my index.php looks like this:
if (isset($_GET['def'])){
header("Location: main.php?cid=8&def=1");
}else{
header("Location: main.php?cid=8");
}
anyway i can get $_GET['def'] to be picked up? thanks in advance.
right now, my htaccess looks like this:
RewriteEngine on
RewriteRule ^([A-Z0-9]{6})/?$ main.php?rid=$1&cid=8 [L]
RewriteRule ^user/([A-Z0-9]{6})/?$ user.php?uid=$1&cid=8 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ main.php?cid=8
my index.php looks like this:
if (isset($_GET['def'])){
header("Location: main.php?cid=8&def=1");
}else{
header("Location: main.php?cid=8");
}
anyway i can get $_GET['def'] to be picked up? thanks in advance.