As Nuno mentions, DXA supports this as well.
The solution is similar to the answer suggesting to change the GetContentByUrl() method.
While that solution will work, it's not ideal, as we don't want to modify core DD4T files.
I'm not sure if you use DD4T v1 or v2 for java, the below code samples are based on v2 (but a similar approach will work for v1 as well)
A better solution is to override the functionality of the DynamicPageController (https://github.com/dd4t/dd4t-2-java/blob/develop/dd4t-example-site/src/main/java/org/dd4t/springmvc/controller/DynamicPageController.java)
In line 121, you find this piece of code
Page pageModel = (Page) genericPageFactory.findPageByUrl(URL, publication);
You should alter this logic, and check for different variations of the URL variable (this variable contains the url you put in your browser.
One caveat for dd4t java version 2 is that it's better to check if a page exists by calling the method
Hope this helps