I have been building a project that is based on Laravel with voyager and everything is fine if run on php artisan serve
, but when I switch to XAMPP I have encountered an issue. Originally, I have issues on both routes and CSS and then I googled around and managed to fix the routes by modifying files, unfortunately the CSS is still failing, looking at /localhost:8080/ecr/vendor/tcg/voyager/assets/css/app.css
its 404
Here are the the config of app
directory details:
xampp/ ├── htdocs/ │ ├── MyProject/ (public folder) │ ├── .htaccess ├── MyprojectCore/ │ ├── app/ | ├── vendor/ │ ├── autoload.php ├── bootstrap/ ├── app.php
index.php on public folder
require __DIR__.'/../../MyprojectCore/vendor/autoload.php';
$app = require_once __DIR__.'/../../MyprojectCore/bootstrap/app.php';
.htaccess on xampp/htdocs/MyprojectCore
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteRule .? %{ENV:BASE}/index.php [L]
</IfModule>
httpd.conf on Apache config
<Directory />
Options Indexes FollowSymLinks MultiViews
Order allow,deny
allow from all
AllowOverride All
</Directory>
I also tried copying the bootstap app but it fails when I run it.