问题
Basically this is my structure:
/
- index.html
- js files ( the ones making http requests to /api/
/api
- api.php
Basicly what im trying to do is to map requests to localhost/api/ to go to localhost/api/api.php
I have tried with the following with no results:
RewriteEngine On
RewriteBase /api/
RewriteRule ^/?(api)/? /api/api.php [NC]
RewriteCond %{REQUEST_METHOD} (PUT|DELETE)
RewriteRule .* /api/api.php
Can anyone help me?
Summary: Right now when making http requests I have to set baseUrl to api/api.php/###
I want to to be reached through api/###
来源:https://stackoverflow.com/questions/35466306/htaccess-file-mod-rewrite-issue