Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check url if it has trailing slash

$getWholeUrl = "http://".$_SERVER['HTTP_HOST']."".$_SERVER['REQUEST_URI']."";

//The output would be 
/*
  http://localhost/tabulation/event/event_name/
*/

if(substr($getWholeUrl , -1)=='/'){
    //Add your condition here

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #url #trailing #slash
ADD COMMENT
Topic
Name
7+9 =