Last active
April 3, 2021 15:12
-
-
Save hellotunmbi/6a51ee0d89fd66be55745aa2b5f5165c to your computer and use it in GitHub Desktop.
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
Options -Indexes | |
Options +FollowSymLinks | |
# Set the default file for indexes | |
DirectoryIndex index.php | |
<IfModule mod_rewrite.c> | |
# activate URL rewriting | |
RewriteEngine on | |
# do not rewrite links to the documentation, assets and public files | |
RewriteCond $1 !^(index\.php|public|robots\.txt) | |
# do not rewrite for php files in the document root, robots.txt or the maintenance page | |
RewriteCond $1 !^([^\..]+\.php|robots\.txt|sitemap\.xml) | |
# but rewrite everything else | |
RewriteRule ^(.*)$ index.php?/$1 [L] | |
</IfModule> | |
<IfModule !mod_rewrite.c> | |
# If we don't have mod_rewrite installed, all 404's | |
# can be sent to index.php, and everything works as normal. | |
ErrorDocument 404 index.php | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment