You want $_SERVER['REQUEST_URI']
. From the docs:
'REQUEST_URI'
The URI which was given in order to access this page; for instance,
'/index.html'
.
More Related Contents:
- Website is very slow, but if I modify the URL it loads normally
- Turn Plain Text URLs into Active Links using PHP [closed]
- URL Redirect / URL Masking [closed]
- URL rewriting with PHP
- Get the full URL in PHP
- PHP validation/regex for URL
- GET URL parameter in PHP
- Replace URLs in text with HTML links
- How can I create friendly URLs with .htaccess?
- PHP ini file_get_contents external url
- Remove all special characters from a string [duplicate]
- Get URL query string parameters
- How to get multiple parameters with same name from a URL in PHP
- How to pass extra variables in URL with WordPress
- Sanitizing strings to make them URL and filename safe?
- Get title of website via link
- PHP Get Site URL Protocol – http vs https
- Beautiful way to remove GET-variables with PHP?
- Get file content from URL?
- encodeURI() in PHP?
- Proper URL forming with a query string and an anchor hashtag
- Manipulate a url string by adding GET parameters
- PHP Application URL Routing
- http_build_query with same name parameters
- Check if URL has certain string with PHP
- Get domain name from full URL
- %2F in URL breaks and does not reference to the .php file required [duplicate]
- Parsing URL query in PHP [duplicate]
- WAMP – Remove localhost from project URL
- Detecting a url using preg_match? without http:// in the string