Gaetan WELTZER Posted July 12, 2018 Posted July 12, 2018 Hi, I'm trying to access the Rest & OAuth menu in the ACP, but it's asking me to put a htacces file in the api directory. I did it and renamed it .htaccess as asked but I still get the screen asking me to download it and put it in the api directory. I have no idea how to resolve this. Best regards The problem might be that I use nginx which is not supporting htaccess files. Can I have some help to convert what's inside this file to nginx config ? I'm pretty new into nginx and that would help me a lot : <IfModule mod_setenvif.c> SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 </IfModule> <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase /api/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] </IfModule>
phreezie Posted August 20, 2018 Posted August 20, 2018 This works for me when developing locally: location / { location /api/ { if (!-e $request_filename){ rewrite ^/api/(.*)$ /api/index.php; } } if (!-e $request_filename){ rewrite ^(.*)$ /index.php; } try_files $uri $uri/ =404; } location ~ \.php$ { include fastcgi-php.conf; fastcgi_pass 127.0.0.1:9000; }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.