While SmartyURL generates JavaScript codes through the CodeIgniter Controllers , I noticed that this caused an HTTP 404 error on the nginx server if the file extension of the included file remained ending with the .js extension.
If I remove the .js from the filename it works fine, but if keep the .js it will shown 404 file not found on some nginx servers.
It may be necessary to change the Nginx configuration, but to improve software compatibility without complicating installation, I recommend removing the .js extension from the file name.
The nginx server which return 404 error was on CloudPanel using proxy on port 80 , but if Try to get the .js file on port 8080 it wil rendered normally.
While SmartyURL generates JavaScript codes through the CodeIgniter Controllers , I noticed that this caused an HTTP 404 error on the nginx server if the file extension of the included file remained ending with the
.js
extension.While tested locally on nginx too (using Homestead) works fine but in some nginx servers return 404 file not found for example: https://github.com/Extendy/SmartyURL/blob/cc9420f741b07d510ebe48f78351f412fa15079a/app/Views/basic/layout.php#L272 https://github.com/Extendy/SmartyURL/blob/cc9420f741b07d510ebe48f78351f412fa15079a/app/Views/basic/url/new.php#L192
If I remove the
.js
from the filename it works fine, but if keep the.js
it will shown 404 file not found on some nginx servers.It may be necessary to change the Nginx configuration, but to improve software compatibility without complicating installation, I recommend removing the
.js
extension from the file name.The nginx server which return 404 error was on CloudPanel using proxy on port 80 , but if Try to get the
.js
file on port 8080 it wil rendered normally.and this is the nginx configuration:
I did not test it on ther web servers like apache.
We must investigate this problem thoroughly and find a solution that does not require special Nginx or web server configuration changes.