Reputation: 92
I'm new to .htaccess. I have two CodeIgniter Project.
I have structured my project like this
parent-folder
--frontend (my frontend codeigniter project)
--backend (my backend codeigniter project)
when I hit example.com it should go to frontend and when I hit example.com/admin it should go to backend.
I'm not getting how to implement using .htaccess.
Upvotes: 0
Views: 254
Reputation: 92
As Vien Mar has given the answer.
I figured out that if you keep the directory structure as
parent-folder(your frontend codeigniter project)
--admin (your backend codeigniter project)
You can get the project running without extra effort. No need of .htaccess file as well.
Upvotes: 0
Reputation: 456
try this
parent-folder(your frontend codeigniter project)
--admin (your backend codeigniter project)
your front end CI project must be in the root folder and the admin directory must be inside the root folder it need two separate .htaccess
files. All files and folders inside frontend
folder must be transferred to the parent-folder.
like this:
parent-folder
--.htaccess(.htaccess for your frontend)
--admin
----.htaccess(.htaccess for you admin)
just make sure to specify your admin .htaccess
file that youre are in the admin folder in the RewriteBase
.
parent-folder:
RewriteBase /
admin
RewriteBase /admin
:)
Upvotes: 1