0
サイトまたはデスクトップアプリケーションが自分のサイトの特定のフォルダにあるスクリプトを呼び出そうとしています。私はそのディレクトリに.htaccess
ファイルを置いています。間違いなく読んで、私は私のApacheのエラーログファイルに次のエラーを取得している:htaccessファイルに誤りがあります
[Sat Oct 14 21:57:01.943348 2017] [core:alert] [pid 3944:tid 1172] [client ::1:57586] C:/wamp64/www/mysite/phpgeneral/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost:52656/mysite/index.html
[Sat Oct 14 21:58:39.918523 2017] [core:alert] [pid 3944:tid 1164] [client ::1:57599] C:/wamp64/www/mysite/phpgeneral/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost:52656/mysite/index.html
これは私の.htaccess
ファイルです。 これらのコマンドに何かがラップされるべきですか?または一般的に何か問題がありますか(私は.htaccess
を初めて使用しています)。
# Always set these headers.
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
Header always set Access-Control-Max-Age "1000"
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
ません必ずApache設定内部headers_module場合**常に**関連する代わりに、Apacheの内部に「*」** –
てみローディングheaders_moduleヘッダーはアクセス制御 - 許可 - 起源を設定**でありますconfig – user4035
@ user4035 - これがそのトリックでした。一行の答えを入れて、私は答えとしてマークします。 – Rewind