php - Get the visible URL -


I'm wondering how can I get the URL (visible in the bar) I have tried to google it and a lot of answers have to be written:

  $ url = "http: //". $ _ Server ['HTTP_HOST']. $ _ Server ['REQUEST_URI'];   

But it will get the path to the file in which you are coming. I would like to get the visible URL just like:

  www.something.com/index.php? Page = teams   

and then only get the URL you can see, and no included URL. When I do this, then something similar happens:

  www.something.com/search.php   

Because the IM is included in the file search URL printing .php.

I hope that you understand my question, even if it is a little worse, I find it very difficult to explain my problem.

For URL: $ _ SERVER ['REQUEST_URI']

After? In Url: $ _ server ['QUERY_STRING']

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -