Problems with CodeIgniter 4.0.4 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Problems with CodeIgniter 4.0.4 (/showthread.php?tid=77447) Pages:
1
2
|
Problems with CodeIgniter 4.0.4 - Omar Crespo - 09-02-2020 Hi, I just download the CI4 and the only way a page loads is wen I use the URL http://localhost/CI4/public I'm using WAMP, with PHP 7.2.14, and the mod_rewrite is ok. Also tried to change $indexPage = 'index.php'; to 'index.php?' But doesn't work. I actually following the tutorial, static pages. Nothing I've tried works. Help. Thanks in advance RE: Problems with CodeIgniter 4.0.4 - chenzen - 09-02-2020 in your command prompt, navigate into the root folder and enter the following command php spark serve If you want to avoid the index.php, create a .htaccess file and put the following code there: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] Hope this helps RE: Problems with CodeIgniter 4.0.4 - Omar Crespo - 09-02-2020 Thanks, but that's for use the native server of CI4. I want to use WAMP. RE: Problems with CodeIgniter 4.0.4 - chenzen - 09-02-2020 (09-02-2020, 05:33 PM)Omar Crespo Wrote: Thanks, but that's for use the native server of CI4. I want to use WAMP. The design of CI has changed. Nevertheless you can setup a virtual host on your machine, that will help you to access the site with an address like http://myproject.test. CI 4 is great, using it for my third project now. Thanks RE: Problems with CodeIgniter 4.0.4 - demyr - 09-03-2020 (09-02-2020, 12:57 PM)Omar Crespo Wrote: But doesn't work. What is the thing that doesn't work? The error you have? Or is it just a blank page? RE: Problems with CodeIgniter 4.0.4 - InsiteFX - 09-03-2020 (09-02-2020, 02:47 PM)chenzen Wrote: in your command prompt, navigate into the root folder and enter the following command CodeIgniter 4 comes with an .htaccess file. RE: Problems with CodeIgniter 4.0.4 - Omar Crespo - 09-05-2020 (09-03-2020, 12:51 AM)demyr Wrote:When I use my baseurl(09-02-2020, 12:57 PM)Omar Crespo Wrote: But doesn't work. http://localhost/CI4 all I get is the index of/ When I call any method like it used to be: http://localhost/CI4/index.php/home/index The error is: The requested url /CI4/index.php/home/index was not found on this server. RE: Problems with CodeIgniter 4.0.4 - InsiteFX - 09-06-2020 You may need to change the .htaccess file. Code: # from this to the below And do not forget that the base url needs to end with a forward slash. RE: Problems with CodeIgniter 4.0.4 - Omar Crespo - 09-06-2020 (09-06-2020, 06:19 AM)InsiteFX Wrote: You may need to change the .htaccess file.Thanks but that whasn't the problem. I kind of solve it by adding public folder to my base url. That should be included in the guide. Instead of $baseURL = http://localhost/CI4/ It works with: $baseURL = http://localhost/CI4/public/ Where can I download the .zip guide of CI4?? Here in my country (Cuba) we have veeery limited online access, so it would be great to read it offline. Thanks RE: Problems with CodeIgniter 4.0.4 - orionstar - 09-06-2020 You should set your virtualhost config (documentroot and directory directives) to point to the public folder then it will work and /public doesnt need to be added to the end of the URL. See my config below: Code: <VirtualHost ng-cms.local:80> |