The problem is the following:
I have a webservice in which I redirect all requests to the index.php
with a.htaccess
I will leave the code .htaccess
here
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+?)/?$ index.php?url=$1 [L,QSA]
When I access the url for example
http://localhost/app_restaurantes/restaurantes
(the restaurants directory does not exist, it must be redirected to the index so that it responds with a json with the list of restaurants) the service works perfectly on localhost
But when I upload the webservice to the server godaddy.com
and access a route, it shows me the following error
404 - File or directory not found. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
I imagine that .htaccess
he is not working
Does anyone know if htaccess
he works with a specific version of apache or if I have to make any changes to it htaccess
?
Hello, Well, the reason why it
htaccess
did not work is because my godaddy server is windows, that is, a strange mixture between IIS and Apache. I tried it on a single Apache server and it works.