Redirect issue on new local project |
Hi! I'm trying the last version of CI (CI4) but I'm getting any problems on the localhost installation.
The project is located in {XAMPP}/htdocs/ejemplo-ci I've in App.php: Code: public $baseURL = 'http://localhost/ejemplo-ci/'; and the routes Code: $routes->get('/', 'Usuarios::index'); There isn't with the home page (references to index section con Usuarios controller) but http://localhost/ejemplo-ci/registro send me to XAMPP Dashboard. Can anybody help me?
For local development it is advised to use php built in web server. See http://codeigniter.com/user_guide/instal...nning.html
On a server everything is served from the public folder and changed using 'mod_rewrite' (on an apache webserver). This requires setting the documentroot in apache to '<location>/ejemplo-ci/public/' (where location is wherever ejemplo-ci is located). My guess is that your XAMPP installation might not have mod-rewrite on or have the DocumentRoot set up.
i've also written this for those on slackware Linux : https://docs.slackware.com/howtos:misc:a..._slackware . It mentions permission problems and being able to have several dev apps towards end
(01-07-2021, 05:16 AM)berendbotje91 Wrote: For local development it is advised to use php built in web server. See http://codeigniter.com/user_guide/instal...nning.html Thank you! It worked, I found the guide very useful: now, I wonder what it will be like to put the project in production in an existing subfolder on a shared server. Surely there is a guide for that ... PHP Code: // change this I had problems with xampp going to the dashboard before so now I just rename the index.php file in the root with the htdocs folder. But now I use VHOSTS What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(01-08-2021, 04:21 AM)rcamino Wrote: Thank you! It worked, I found the guide very useful: now, I wonder what it will be like to put the project in production in an existing subfolder on a shared server. There might be a solution here: https://forum.codeigniter.com/thread-759...ed+hosting if you want to keep using shared hosting. However, I can't test it myself since I host on a VPS myself. |
Welcome Guest, Not a member yet? Register Sign In |