###発生している問題・エラーメッセージ
以下の条件でWordPress環境を構築しましたが、公開ページだけ、CSSが読み込まれません。管理画面では問題なく表示されます。なぜでしょうか。。。
chromeの開発者コンソールには、以下のメッセージが出力されます。
Resource interpreted as Stylesheet but transferred with MIME type text/plain:
IEのの開発者ツールでは、以下のように出力されます。
SEC7113: CSS は、MIME の種類が一致しないため、無視されました
###条件(環境、INIファイルの設定等)
<環境>
・CentOS 7.1.1503
・Apache/2.4.6
・mysql Ver 14.14 Distrib 5.7.17
・PHP 5.4.16
・WordPress 4.7–ja
・確認したブラウザ chrome 55.0.2883.87 m (64-bit)、IE 11.576.14393.0
<iniファイルの設定(変更部分のみ頭に「< 」を付与して抜粋)>
・php.ini
< default_charset = "UTF-8"
< date.timezone = "Asia/Tokyo"
< mbstring.language = Japanese
< mbstring.internal_encoding = UTF-8
< mbstring.http_input = pass
< mbstring.http_output = pass
< mbstring.encoding_translation = Off
< mbstring.detect_order = auto
< mbstring.substitute_character = none;
< mbstring.func_overload = 0
< tring.http_output_conv_mimetypebstring.strict_detection = Off
< mbstring.http_output_conv_mimetype=
・my.cnf
< character-set-server = utf8
< default_password_lifetime = 0
・httpd.conf
< Options Includes ExecCGI FollowSymLinks
< AllowOverride All
< #AddDefaultCharset UTF-8
< AddType text/css .css
< AddType text/javascript .js
・firewalld
httpを許可
firewall-cmd --add-service=http --zone=public --permanent
<WordPressの展開>
・場所
/var/www/html/配下(/var/www/html/wordpressディレクトリ)
・権限
chown -R apache.apache /var/www/html/wordpress
###補足
IEの互換表示で表示するとCSSは読み込まれます(正しいレイアウトで表示される)。もちろん互換表示は本意ではありません。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。