I have lots of files starting with “display-“, like:
display-profile.php
display-photos.php
display-comments.php
...
I want to keep those names for organization (as there are files with other prefixes), but I want to remove “display-” from my URLs.
I was going to use .htaccess to check if display-%{REQUEST_URI} is a file, but that environment variable has a slash “/” at the begin.
How do I get the %{REQUEST_URI} without the slash at the beginning? Or, is there any other way to check this?
Thank you. I use Apache on a Linux.
Or, another option:
Possibly shorter:
Or even: