Created
April 9, 2020 01:27
-
-
Save willnode/817e1161314655dc92ba1f25ca8a37c2 to your computer and use it in GitHub Desktop.
CodeIgniter4 .htaccess config if you insist to host it at project root rather than /public directory. Used by https://github.com/willnode/crm-toolkit
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
# Generally you wouldn't point your server at api root. | |
# Althought it works, always configure your server | |
# correctly when you're doing production! | |
# That's enough warning. If you put this directory | |
# on subdirectory, please configure that to here. | |
# Don't forget to set $uriProtocol to PATH_INFO (Config/App.php) | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^$ /public/index.php/home/index [L] | |
RewriteRule ^(.*)/$ $1 | |
RewriteRule ^(.*)$ /public/$1 [L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment