Php

Asked • 05/28/19

Get the full URL in PHP?

I use this code to get the full URL: $actual_link = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; The problem is that I use some masks in my `.htaccess`, so what we see in the URL is not always the real path of the file. What I need is to get the URL, what is written in the URL, nothing more and nothing less—the full URL. I need to get how it appears in the Navigation Bar in the web browser, and not the real path of the file on the server.

1 Expert Answer

By:

Volcano T. answered • 05/28/19

Tutor
New to Wyzant

Programming / SysAdmin / DBA

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.