A
A
Anton Natarov2016-04-21 00:30:18
Apache HTTP Server
Anton Natarov, 2016-04-21 00:30:18

MVC PHP how to correctly configure htaccess so that css is also connected?

Good time! Tell me how you can connect or solve the problem with connecting Css and JS. There is a very simple implementation of MVC.
Through .htaccess I redirect to the index page.

addDefaultCharset utf-8

RewriteEngine on
RewriteBase /

rewritecond %(REQUEST_FILENAME) !-f
rewritecond %(REQUEST_FILENAME) !-d
RewriteRule ^(.*)$ index.php

I connect like this. There are no errors in the paths. the IDE itself determined that it was written correctly. And if I delete htaccess, then I successfully get it for reading along this path.
<link href="/temp/css/bootstrap.css" type="text/css" rel="stylesheet">

In doing so I created htaccess inside temp and inside css folder trail content:
Satisfy Any
Allow from all

In the hope that this will override the rules that are imposed by Apache or higher. But no results. How can I fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Natarov, 2016-04-21
@HanDroid

Understood. by changing condition in main htaccess

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

If the transmitted link is not a directory, file, link.
everything immediately worked as it should.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question