CodeIgniter Forums
Help with .htaccess file - Windows - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Help with .htaccess file - Windows (/showthread.php?tid=77659)



Help with .htaccess file - Windows - jithinjohnygeorge - 10-01-2020

Hello there,

I was trying to follow the official documentation with "Build Your First Application" and on the news section, the router is not being routed as expected. I understand that the issue is with the .htaccess file. Can you please post how the htaccess file should be.

Details :

OS : Windows 10

I've installed xampp and the path to php inside the xampp is added to the path. And I run the application with >php spark serve command from the project folder (not inside htdocs)

Thank You


RE: Help with .htaccess file - Windows - nc03061981 - 10-01-2020

Goto folder have spark file and run

Here is source code codeigniter.com write with CI4, you can see and learn https://github.com/codeigniter4projects/website2

I learn from it to Upgrade my site from CI3 to CI4


RE: Help with .htaccess file - Windows - jithinjohnygeorge - 10-01-2020

(10-01-2020, 01:44 AM)nc03061981 Wrote: Goto folder have spark file and run

Here is source code codeigniter.com write with CI4, you can see and learn https://github.com/codeigniter4projects/website2

I learn from it to Upgrade my site from CI3 to CI4

Thank you for the response. I can run the project. The home page is loading fine. But for the additional controllers, I am getting "404 - File Not Found" error.

I've followed everything as per the documentation, except for .htaccess file.


RE: Help with .htaccess file - Windows - nc03061981 - 10-01-2020

Define route in App\Config\Routes.php


RE: Help with .htaccess file - Windows - jithinjohnygeorge - 10-01-2020

(10-01-2020, 02:27 AM)nc03061981 Wrote: Define route in App\Config\Routes.php

Is there any documentation / resource available ?


RE: Help with .htaccess file - Windows - nc03061981 - 10-01-2020

Here https://codeigniter.com/user_guide/incoming/routing.html


RE: Help with .htaccess file - Windows - InsiteFX - 10-01-2020

With XAMPP your project should be in the htdocs folder.

htdocs
-- project 1
-- project 2
-- etc.

Or you can do like I do and use vhosts.