CodeIgniter application How should the portal file index.php be overwritten after the app directory is created?

Source: Internet
Author: User
Tags codeigniter
----Application
-------Admin
-----------Cache
-----------Config
-----------Controllers
-----------Core
-----------Errors
-----------Helpers
-----------Libraries
-----------Model
-----------views
-------Home
-----------Cache
-----------Config
-----------Controllers
-----------Core
-----------Errors
-----------Helpers
-----------Libraries
-----------Model
-----------views
-----System
-----Public (root directory)
-----------admin.php
-----------index.php


I'm http://www.ci.com at the front desk.
The back end is http://www.ci.com/admin.php must have the. php suffix Plus to be able to access it normally
Public directory can put a common config.php to specify the default access to the module and manually loaded Access module???



Two entry files index.php front desk admin.php backstage. htaccess There's only one, now. Htaccess wrote

Rewriteengine on
Rewritebase/
Rewritecond%{request_filename}!-f
Rewritecond%{request_filename}!-d
#RewriteRule!. (JS|ICO|GIF|JPE?G|BMP|PNG|CSS) $ index.php [nc,l]
Rewriterule ^ (. *) $ index.php [L,e=path_info1]

Http://www.ci.com default entry is the front end, I now want to http://www.ci.com/admin into the backend, now is to write
http://www.ci.com/admin.php plus suffix to normal access,. How to write in htaccess???
What's the difference between the rewrite rules of Apache Linux?


Reply to discussion (solution)

Above said wrong, I am now Apache behind to use Nginx run, nginx under the pseudo-static and how to write? Index.php and admin.php in both front and back

Put it on Linux why is the CSS JS path wrong?
/uikit.min.css ">



Windows that's right, put the Linux CSS JS will not be loaded

Have you ever done that?

CI development is a single-entry site, your URL rewrite is to adapt to a single portal site and write
The front and back ends of the site should be different projects (the former is for the public, the latter for administrators)

Want to http://www.ci.com/admin into the back end
Parsing of the admin model can be added to the routing table
You can also put the back-end project in the admin directory and put a. htaccess in the admin directory.
Of course, the entry file name is index.php

As for what Base_url ("Asset/uikit/js") has returned, you have to look first to know, right?

CI development is a single-entry site, your URL rewrite is to adapt to a single portal site and write
The front and back ends of the site should be different projects (the former is for the public, the latter for administrators)

Want to http://www.ci.com/admin into the back end
Parsing of the admin model can be added to the routing table
You can also put the back-end project in the admin directory and put a. htaccess in the admin directory.
Of course, the entry file name is index.php

As for what Base_url ("Asset/uikit/js") has returned, you have to look first to know, right?



Thank you!

Well, let's try it from a portal file to home.php and admin.php. I also want to directly modify routes.php to achieve the kind of

Base_url ("Asset/uikit/js") after the output of the URL put into the wiindows can be, Linux is not right, I find out where the problem.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.