Mobile app version of vmapp.org
Login or Join
XinRu657

: Enabling URL rewriting for API 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

@XinRu657

Posted in: #Apache #Api #Php #Webserver

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @XinRu657

1 Comments

Sorted by latest first Latest Oldest Best

 

@Yeniel560

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme