My site uses URLs like example.de/user1 or example.de/project33, which can be rewritten by an .htaccess-file.
The string after the slash is choosen by a user.
My problem is, that some URLs are user profile links and should be rewritten to profile.php?id=... and some URLs are project-links, which should be rewritten to project.php...
How can you handle it?
I thought about a HTTP header, which trigger a rewriteCondition (like -l, -f, -d etc…).
Since you have no way to determine the appropriate target just by looking at the URL alone, you are going to need a dispatcher-style script to which you redirect all those requests, and that script then takes the decision for the final redirect towards
profile.phporproject.php. Can’t happen inmod_rewriteotherwise, as it does not have any knowledge of your custom-URL database.