I have a structure as follows:
- index.php
- .htaccess
- assets
- app.js
- modules
- main
- default.php
- demo
- default.php
- main
The .htaccess is:
RewriteRule ^([a-zA-Z0-9\_]+)/?([a-zA-Z]+)?$ index.php?module=$1&view=$2 [L,NC]
The index.php is:
<script src="assets/app.js"><script>
<?php
$module = (isset($_REQUEST['module'])?$_REQUEST['module']:'main';
$view = (isset($_REQUEST['view'])?$_REQUEST['view']:'default';
include 'modules/'.$module.'/'.$view.'.php';
?>
When I enter the url index.php I have no problem, but when I enter the url main / default / can not find the file main / default /assets/app.js , I do not know what that is and how to solve it, thanks.