php - Problem with checking GET


I am trying to check $GET array. But i have some problem.

URL: http://


if (!empty($_GET['s'])) {
 echo '1';
else {
 echo '0';

Result: 0

But if i use http://

But script is working normaly if i am using both adresses except GET.

Why GET is not working with this url http:// and working with http://

PS. OS: Windows

My problem was RewriteRule ^([a-z_]*)/?$ index.php?s=$1

If somebody knows: How to make http:// and http:// available in one time?

Answer: [QSA] flag at the end of Rewrite rule ^([a-z_]*)/?$ index.php?s=$1 [QSA]

Thanx all for help!




You didn't mention which web server you are using. This looks to be a problem with your URL rewriting rules; for Apache, ensure thatmod_rewrite preserves the query string (the portion after the?).

People are also looking for solutions to the problem: php - is there a max_value function for xml child node?


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.