You are here:Home»KB»Web Server»htaccess»URL parts explained in Server Enviromental Variables
Friday, 28 November 2014 00:00

URL parts explained in Server Enviromental Variables

Written by

This useful article shows you what parts of a URL you can build with .htaccess server enviromental variables.

 http://www.quantumwarp.com:8080/subfolder/subfolder2/index.php?turnip=51
 1     2                        3                     4        5         6

- $_SERVER['SERVER_NAME'];  2-3  (port number is not included)
- $_SERVER['REQUEST_URI'];  3-6
- $_SERVER['QUERY_STRING']; 5-6  (? is not included)

- $_SERVER['HTTP_HOST'];    2-3
- $_SERVER['HTTPS'];        This is a Boolean for HTTPS
- $_SERVER['SCRIPT_NAME'];  2-5
- $_SERVER['PHP_SELF'];     2-5
Read 893 times Last modified on Saturday, 10 December 2016 15:43