Last active
February 19, 2019 21:50
-
-
Save sleeyax/080b2f5cdf77a0fcf684549ece2fa246 to your computer and use it in GitHub Desktop.
htaccess for MVC frameworks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# Check if request doesn't point to actual dir, file or symlink | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-l | |
# http://localhost/foo/bar => http://localhost/index.php?request=foo/bar | |
RewriteRule ^(.+)$ index.php?request=$1 [QSA,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment