0

I have all the css,js and images in public folder enter image description here

It give me 404 when I open the website.

Links http://domain.test/js/bootstrap-autocomplete.js

Shows 404 error

if I try link with public' path it opens http://safwa_new.test/public/js/bootstrap-autocomplete.js`

I tried modifying the .htaccess file in the root folder it is not working

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule  (.*)  public/$1  [L]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

it is not working

enter image description here

B L Praveen
  • 1,812
  • 4
  • 35
  • 60
  • per this thread https://stackoverflow.com/questions/24784606/laravel-routes-not-working-apache-configuration-only-allows-for-public-index-ph commone issues are mod rewrite not enabled or allowoverrides not configured properly in aapche. – Cameron Aug 18 '21 at 19:38
  • Can you share which path the browser trying to reach exactly? Are you sure it is looking for `http://domain.test/js/bootstrap-autocomplete.js` ? Maybe it is looking for `http://domain.test/en/js/bootstrap-autocomplete.js` Did you use `{{ asset('js/bootstrap-autocomplete.js') }}` in your blade file to create it's full path ? – Uğur Arıcı Aug 18 '21 at 22:05
  • No issue was in Laragon apache.conf file – B L Praveen Aug 19 '21 at 15:48

0 Answers0