Category: .htaccess

CORS policy: It does not have HTTP ok status

From https://example.com, I would like to get data from https://api.example.com/login. But what I get is this error: Access to XMLHttpRequest at ‘https://api.example.com/login‘ from origin ‘https://example.com‘ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check:…

How to redirect old site URL to new Symfony 4 application URL using htaccess file?

I am in the process of migrating a static website to Symfony 4. I would like to redirect the old URLs to their corresponding routes in the new Symfony 4 app (while keeping the same domain name), like so: https://www.old-site-url.com/contact.html…