http://localhost/allsides/.htaccess
RewriteRule (.*) index.php?$1 [L]
http://localhost/allsides/test
One or more chars after allsides/ are saved in $1
$_GET is $1.
test is not $_GET!
What is wrong?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When
…?testis requested,$_GET’s first element’s key will betestan has no value (equal to…?test=).So either use
current(array_keys($_GET))to get the key of the first element of$_GETor use$_SERVER['QUERY_STRING']to get the full query.