So if the user types mydomain.com/dashboard, the document the server actually sends them is /launch.php?i=/dashboard.
The one caveat is that I would like to leave requests for
- /flags
- /people
- /posters
- /css
- /icons
- /images
- /libraries
- /patterns
alone, and they should request the actual folder.
How would I create such a mod_rewrite?
This is the .htaccess file for the CakePHP Framework.
Please replace the index.php and ?url= to fit your needs.
The ‘!-d’ tells Apache to follow existing folders and ‘!-f’ to follow existing files.
Everything else is channelled through index.php
As suggested in a comment, you have to be aware that if it’s not working it could be because mod_rewrite is not enabled and you’ll not get an error stating that fact, you’ll probably only have a HTTP 404.