D
D
Doclassif02021-08-13 09:17:32
Apache HTTP Server
Doclassif0, 2021-08-13 09:17:32

htaccess not working?

It's all on Windows.
Added to \Apache24\conf\httpd.conf

<Directory "${SRVROOT}/htdocs/www/test/site">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

And in the \Apache24\htdocs\www\test\site directory in the .htaccess file added
Test.
<FilesMatch "\.(json|php)$">
  Header add Access-Control-Allow-Origin "*"
  Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
  Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
</FilesMatch>

I specifically made a mistake to see if it works.
But nothing happens, there is no error, why it doesn’t work I can’t understand.
What could be the problem?
LoadModule rewrite_module modules/mod_rewrite.so is uncommented.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question