abdosaeedelhassan's avatar

Mix.version append id

Hi, in the production server when i use mix.version(), assets files (js and css) with appended id not allowed to access, when i remove the id the file open normal, i think there is something in cpanel configuration to solve this, need your help

0 likes
13 replies
Sinnbeck's avatar

Can you link to a file that does not work? What error are you getting? Are you using the mix() helper instead of asset()?

abdosaeedelhassan's avatar

@Sinnbeck Yes i use mix helper function, if i link the file her you can't see it because it is in the backend, the error is 404 NOT FOUND

Sinnbeck's avatar

@abdosaeedelhassan it looks like a laravel 404. You don't by any chance have a route that matches the url exactly? Something with /js/app in it

Or if you are running apache. Did you change your htaccess?

1 like
abdosaeedelhassan's avatar

@Sinnbeck there is no route like this, in the backend the page open normal the error shown in console only

   GET https://tyqnn.com/js/app.js?id=1a5499264c1769c2a186 net::ERR_ABORTED 404 (Not Found)
mabdullahsari's avatar

Couple options:

  • There is something wrong with your web server configuration. An appended query string should not cause any 404 by itself.
  • You are converting all exceptions to 404s in your ExceptionHandler, so you can't even properly see the generated error.
  • Your Mix manifest does not exist in the public folder. Do you even build the assets on prod?

One can only guess at this point. Verify bullets above and/or provide more info.

1 like
Sinnbeck's avatar

Can you post the solution in case others experience the same?

abdosaeedelhassan's avatar
Level 29

@Sinnbeck today i found that, there is a httaccss file inside js folder that make deny for js files also i found the same files expanded with .text extention, i think there is a virus attack my hosting server, thank you

Sinnbeck's avatar

@abdosaeedelhassan ah sorry to hear that. But good that you solved the issue I suppose. I assume deleting the file was the solution the then?

Please or to participate in this conversation.