I done creating my own API,and host it to Ubuntu 16.04.I created the phpmyadmin with Php One click install.
Done this 2 line of command in digital ocean console
sudo a2enmod rewrite
sudo service apache2 restart
I have my own .htaccess
file which is like below
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L]
And I transferred my file to /var/www/html
this directory.
I edit the apache2.config as well like below as well
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
But when I call my api in Postman it show me this result it state url not found.I request my address as http://MY_IP_ADDRESS/example/v1/register
,I am sure is correct URL.
Somebody please tell me what can I do to solve this problem.What am I missing out??
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
@matchartproduction
What you’d use really depends on how your application is setup to handle requests to
index.php
.You may be able to use something such as:
or