Php - SPA
Im encountering an issue in Single Page Application (SPA) where the dmxAppConnect.js
file cannot be accessed when a specific page is loaded. The browser console displays the following error message:
https://xxxxxx.com/backOfficeNew/firma-detay/dmxAppConnect/dmxAppConnect.js net::ERR_ABORTED 404 (Not Found)
The dmxAppConnect.js
file is physically present in the directory:
/var/www/vhosts/xxxxxx.com/httpdocs/backOfficeNew/dmxAppConnect/dmxAppConnect.js
The .htaccess
file contains the following rules for SPA routing:
## Wappler routing
RewriteEngine On
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?login(?:/)?$ login.html [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?faturalar(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?tarife-islemleri(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?tarife-detaylar/([^/]+?)(?:/)?$ index.php?tarifeno=$1 [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?abone-detay/([^/]+?)(?:/)?$ index.php?musterino=$1 [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?firma-detay/([^/]+?)(?:/)?$ index.php?musterino=$1 [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?kullanici-detay(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?cdr-islemleri(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?hat-islemleri(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?gonderi-bilgileri(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?evrak-indir(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?yeni-abone-kaydi(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?log(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?abone-hatlar(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?abone-dosyalari-yukle(?:/)?$ index.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?firmabilgileri/([^/]+?)(?:/)?$ index.php?musterino=$1 [QSA,NC,L]
## End Wappler routing
Wappler Include
<!-- Wappler include head-page="../index.php" fontawesome_5="cdn" id="firma_detay" components="{dmxBootstrap5Modal:{},dmxBootstrap5Popovers:{},dmxFormatter:{},dmxBootstrap5Tooltips:{},dmxBootstrap5TableGenerator:{},dmxBootstrap5PagingGenerator:{},dmxBootstrap5Navigation:{},dmxBootstrap5Alert:{},dmxDatePicker:{},dmxValidator:{},dmxBootstrap5Offcanvas:{},dmxBrowser:{},dmxDatastore:{},dmxDataTraversal:{},dmxMoment:{},dmxNotifications:{},dmxStateManagement:{}}" moment_2="cdn" bootstrap_icons="cdn" is="dmx-app" appconnect="local" bootstrap5="cdn" -->
- The application is running on an Apache server.
- Directory permissions and configurations have been validated.
Direct access to the dmxAppConnect.js
file was tested via browser:
https://xxxxxx.com/backOfficeNew/dmxAppConnect/dmxAppConnect.js
Could you please investigate the issue and provide a detailed solution? Thank you!