A
A
Alexander2016-09-22 18:24:14
Apache HTTP Server
Alexander, 2016-09-22 18:24:14

Mime type mismatch?

Good evening.
Styles are not included. I registered the types in the Apache config

#-----------------------------------------------#
# Конфигурация MIME
#-----------------------------------------------#

<IfModule mime_module>

    TypesConfig     "%sprogdir%/modules/http/%httpdriver%/conf/mime.types"

    #AddType        application/x-gzip      .tgz
    #AddEncoding    x-compress              .Z
    #AddEncoding    x-gzip                  .gz     .tgz

    AddType         application/x-compress  .Z
    AddType         application/x-gzip      .gz     .tgz
    AddType         image/x-icon            .ico

    AddHandler      cgi-script              .cgi    .pl
    AddType         application/x-httpd-php .php    .php5 .phtml

    #AddHandler     type-map                var
    AddType         text/html               .shtml
    AddOutputFilter INCLUDES                .shtml
    
    AddType text/css .css
    AddType text/javascript .js

</IfModule>

and in .htaccess
addDefaultCharset UTF-8

#AddType 'text/css; charset=UTF-8' css

<IfModule mod_mime.c>
    AddType text/css .css
    AddType text/javascript .js
</IfModule>

<IfModule mod_rewrite.c>

    RewriteEngine On

    Options +FollowSymLinks -Indexes

    RewriteCond ${REQUEST_FILENAME} !-f
    RewriteCond ${REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]

</IfModule>

also type='text/css' attribute added to link
Doesn't work.
I tried nginx - it starts, but I can't configure mod_rewrite there, when I add open server lines to the config, it doesn't start. How much I fight already, the work is worth it) can anyone help, guys?
Thank you.
charset utf-8;
    
    location / {
        rewrite ^(.*)$ /index.php break;
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2016-09-23
@AVEN1Q

Well, Apache has nothing to do with it, of course.
Replaced the corresponding lines with

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

and earned.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question