.htaccess error Ubuntu Lamp server

July 13, 2016 325 views
Deployment LAMP Stack Ubuntu 16.04

I recently began to build a Link shortener and I had to use the .htaccess so that I can change the link so that something like would go to say google instead of something like

After I tested this on my own local server and watching as it works I put it on my server here and I got this: is currently unable to handle this request.

This is my .htaccess :

RewriteEngine On
RewriteRule ^([^/]+)/? index.php?title=$1 [L,QSA]
1 Answer

Did you make sure to enable the rewrite module for apache? You can do this with the following commands:

sudo a2enmod rewrite
sudo service apache2 restart

If you continue to see errors, review the messages recorded in /var/log/apache2/error.log as they should provide some additional information about the error.

Have another answer? Share your knowledge.