php: getting rid of ?p= query in url?

请求翻译

hey guys, i'm not looking for a mod_rewrite thing or anything related. i'm just not sure if this is possible or not?

i'm using if(isset($_GET['p'])) …?to check if ?p=something is set in my url, if not $foo = "bar"; if a ?p= is set e.g. ?p=something –> $foo = "something". got me?

if i manually enter now ?p=bar to my url the string in my url is actually the default one. Because if I don't have a ?p in my url $foo = "bar";

I wonder if that's the case i can get totally get rid of the ?p= part in my url? if the default string is set to my $foo variable i just wanna have a clean url without any distractign ?p=bar in my url.

sorry for the weird foo and bar stuff, i had no better example ;) regards matt

6个回答