My problem is to make the server to recognize the files in my folder, I'm doing my own MVC framework and the problem comes about when I redirect a page from my controller, for example in the first time with an empty url and calling the Home controller like
/MySite/
it found all the images and files I need to show the page, for example:
/MySite/css/file.css
or /Site/Image/image.jpeg
,
because the server found the directories in the rewritten url public/Image/image.jpeg
.
But if I make an url like /MySite/index/action
and define another action to call
when the controller finally returns the page, and all the files in the page being loaded, it tries to found that files, but these urls come back to my front controller like
/MySite/index/css/file.css
I don't understand why the url is not overwitten at all, but the call for the file overrides only the last part, so the action, naturally the files found the first time in public/Image/image.jpeg
cannot be found at public/index/Image/image.jpeg
..
Can anyone help with this?
my .httpaccess files is realy simple:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
and the file inside public:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\??(.*)$ index.php?route=$1&query=$2 [L,QSA]
</IfModule>