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??
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php [NC,L,QSA]
or
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [NC,L,QSA]
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.