There's a couple of ways you could tackle this. I think the easiest one would be to edit your apache main .conf file. (Usually, this file is located on C:/xampp/apache/conf/httpd.conf if i'm not mistaken). Once you're there, put something like this at the end of the file:
Code:
Alias /codeigniter/ "C:/xampp/htdocs/Codeigniter/public"
<Directory "C:/xampp/htdocs/Codeigniter/public">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Note that the 'public' part is important, since Codeigniter 4 was build to run from the public folder inside the project. After you've saved changes restart your XAMPP/Apache
Now we need to go inside your project folder and edit the
public/.htaccess file. Find the 'RewriteBase' line, remove the comment deleting the `#` and insert /Codeigniter after RewriteBase so it looks like `
RewriteBase /Codeigniter`
Now you should be able to access your project on localhost/Codeigniter.
Also, don't forget to properly edit your BaseURL on the .env file accordingly.
Also, be careful with upper case letters on your project folder's name when using this approach. Even tho Windows is not case sensitive, i think this could still cause some issues