前提
WordPressでSSL設定をしていますが、本来のURL以外でアクセスされたときにエラーが表示されます。
本来のURL
例)
https://aaa.jp
http://aaa.jp
や
aaa.jp
でアクセスされると下記のようなエラーメッセージが表示されます。
asset.phpの行目でそのURLには該当のファイルがないからエラーが表示されているのだと思うのですが、
http:// でアクセスされたらhttps:// に置換すればよいのでしょうか?
実現したいこと
ここに実現したいことを箇条書きで書いてください。
- ▲▲機能を動作するようにする
発生している問題・エラーメッセージ
エラーメッセージ Warning: filemtime(): stat failed for http://aaa.jp/wp-content/themes/xeory-base/style.css in /home/bbb/aaa.jp/public_html/wp-content/themes/xeory-base/functions/asset.php on line 71 Warning: filemtime(): stat failed for http://aaa.jp/wp-content/themes/s-checker/template-1/sass/child-style.css in /home/bbb/aaajp/public_html/wp-content/themes/xeory-base/functions/asset.php on line 71 Warning: filemtime(): stat failed for http://aaa.jp/wp-content/themes/s-checker/float-cta/float-cta.css in /home/bbb/aaa.jp/public_html/wp-content/themes/xeory-base/functions/asset.php on line 71 Warning: filemtime(): stat failed for http://aaa.jp/wp-content/themes/xeory-base/css/font-awesome.css in /home/bbb/aaa.jp/public_html/wp-content/themes/xeory-base/functions/asset.php on line 71 Warning: filemtime(): stat failed for http://aaa.jp/wp-content/themes/s-checker/style.css in /home/bbb/aaa.jp/public_html/wp-content/themes/xeory-base/functions/asset.php on line 71 Warning: filemtime(): stat failed for http://aaa.jp/wp-content/themes/s-checker/js/pagetop.js in /home/bbb/aaa.jp/public_html/wp-content/themes/xeory-base/functions/asset.php on line 71 Warning: filemtime(): stat failed for http://aaa.jp/wp-content/themes/s-checker/js/app.js in /home/bbb/aaa.jp/public_html/wp-content/themes/xeory-base/functions/asset.php on line 71 Warning: filemtime(): stat failed for http://aaa.jp/wp-content/themes/s-checker/js/slick.min.js in /home/bbb/aaa.jp/public_html/wp-content/themes/xeory-base/functions/asset.php on line 71 Warning: filemtime(): stat failed for http://aaa.jp/wp-content/themes/s-checker/js/satei_common.js in /home/bbb/aaa.jp/public_html/wp-content/themes/xeory-base/functions/asset.php on line 71 Warning: filemtime(): stat failed for http://aaa.jp/wp-content/themes/s-checker/float-cta/float-cta.js in /home/bbb/aaa.jp/public_html/wp-content/themes/xeory-base/functions/asset.php on line 71
該当のソースコード
PHP
1/*------ Add version for css and js ------*/ 2if( !function_exists( 'bzbsk_add_wp_ver_css_js' ) ) { 3 function bzbsk_add_wp_ver_css_js( $src ) 4 { 5 if( is_admin() ) return $src; 6 7 if( strpos( $src, 'wp-content/themes/' ) ) { 8 $src_path = str_replace( home_url('/'), ABSPATH, $src ); 9 $mtime = filemtime( $src_path ); 10 $src = $src . '?ver=' . $mtime; 11 } 12 13 return $src; 14 } 15 add_filter( 'style_loader_src', 'bzbsk_add_wp_ver_css_js', 9999 ); 16 add_filter( 'script_loader_src', 'bzbsk_add_wp_ver_css_js', 9999 ); 17} 18
試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。