I'm new to configuring API web servers and I'm trying to enable URL rewriting for the server so that a user can go to my public DNS.com/getAlbum to access a method within my api.php file (assumption, I'm still learning this all). I was given the command cd /etc/apache2/mods-enabled; ln -s ../mods/rewrite.load rewrite.load, however when I run that, it says it fails to create the symbolic link rewrite.load: File exists. I checked this file and it contains the same code located in mods-available/rewrite.load, so I think there is something incorrect in apache2.conf. I can also update this to include any needed info. How do enable URL rewriting to get my API working?
Enabling URL rewriting for API
apache;php;webserver;api
First, the easier way to enable a modules is with a2enmod So you could do a2enmod rewrite.But that 'file exists' error you're getting probably means its already enabled. Make sure to do an apache2ctl graceful to activate the new config.