Hi there . I'm new to ci enviroment and i have some questions to some more experienced users .
Is there any chance to have separate admin app folder and logic like wordpress does ?
Separate routes frontend from backend ?
loading routes per first uri segment?
Right now i've installed ci4 and moved index.php and htacces file back into root folder , added admin foder(custom script not related to ci4) i can acces backend and everything works fine there (not loading any ci4 classes ).
yoursite .com /codeiniter/admin/index.php?page=settings&do=permalinks
front end works fine .. but doesn't seems to be the right way to do it .
working on xampp localhost so /codeigniter folder it's a must, no virtual host added.
Thanks !
Code:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
# If you installed CodeIgniter in a subfolder, you will need to
# change the following line to match the subfolder you need.
# http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
RewriteBase /codeigniter/
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Rewrite "www.example.com -> example.com"
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to the front controller, index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /codeigniter/index.php/$1 [L]
# Ensure Authorization header is passed along
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>