0
I am having problems with a small PHP MVC application that I am developing, I searched the internet and found that possibly mine .htaccess
, is annexed hereto:
RewriteEngine On
RewriteCond %{REQUEST_URI} !-f
RewriteCond %{REQUEST_URI} !-d
RewriteCond %{REQUEST_URI} !-l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
Is it correct? It might be in some of my libs in php too, my folder structure is like this:
|config <br/>
|-bundles.php <br/>
|-global.php <br/>
|controllers <br/>
|-index.php <br/>
|-help.php <br/>
|-home.php <br/>
|libs <br/>
|-bootstrap.php <br/>
|-controller.php <br/>
|-model.php <br/>
|-view.php <br/>
|models <br/>
|scripts <br/>
|-bootstrap.min.js <br/>
|style <br/>
|-bootstrap <br/>
|--bootstrap.min.css <br/>
|--bootstrap-theme.min.css <br/>
|-site.css <br/>
|views <br/>
|-_layout.php <-- Está pagina está carregando todas os JS's CSS's <br/>
|.htaccess <br/>
|index.php <br/>
If you want to give me a suggestion on the organization of the archives I also accept, thank you!
PS.: I’m using APACHE from XAMPP
Ever tried to add
AddType text/css .css
in your htaccess ? This usually happens when you access a url with/
in the end. I don’t know if that’s the case.– Mauro Alexandre
How would you look in case? Could you help me? I don’t know much about . htaccess
– Márcio Eric
You will add this line to your htaccess and restart your xampp.
– Mauro Alexandre
Well, it didn’t work out so well, but I did it in an unconventional way: I created a CSS controller for this that contains the header(header) of type text/css
– Márcio Eric
It worked, but did not have a way with less gambiarra to work?
– Márcio Eric
Let’s go continue this discussion in chat.
– Mauro Alexandre