View Full Version : any htaccess gurus out there?

09-14-2007, 05: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");
header("Location: main.php?cid=8");

anyway i can get $_GET['def'] to be picked up? thanks in advance.

09-14-2007, 05:14 PM
That's part of the query string and needs special syntax.

09-14-2007, 06:00 PM
ah yes. that link was SO HELPFUL! I love this forum. you guys are awesome. Thanks nikkiH!

09-14-2007, 08:16 PM
You're welcome :)