• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with .htaccess file - Windows

#1
Sad 
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
Reply

#2
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

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply

#3
(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.
Reply

#4
Define route in App\Config\Routes.php

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply

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

Is there any documentation / resource available ?
Reply

#6
Here https://codeigniter.com/user_guide/incom...uting.html

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply

#7
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.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.