Stopping 404 pages when adding get variable to the URL
You need a menu callback that accepts the variable. For more info, take a look at the Drupal docs. 

Another way to do this is to pass your variable as a query parameter like http://mywebsite.com/my-content-url/my-content-url?var=myvariable. You can then use code to parse that parameter from the URL. You can get those parameters by using something like \Drupal::request()-&gt;query-&gt;all();