...

View Full Version : any htaccess gurus out there?



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.

nikkiH
09-14-2007, 04:14 PM
That's part of the query string and needs special syntax.
http://www.webmasterworld.com/forum92/664.htm

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

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum