Mod Rewrite Apache2.2.22 Problems...

Posted October 22, 2013 4.4k views
So, I setup my droplet with the following commands: apt-get update; apt-get upgrade; apt-get install apache2; a2enmod rewrite; apt-get install php5 php5-mysql; Droplet information: Ubuntu 12.04 x64 New York 2 .htaccess file used: RewriteEngine On RewriteRule ^([a-z0-9]+)$ /go.php?code=$1 [L] doesn't work, returns 404.

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.

Submit an Answer
7 answers
Did you enable your site? What's in your /etc/apache2/sites-enabled directory?
Sorry for the double post, my internet is playing up and it didn't show. :/
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache.
I know how to do that... but only my apache2.2.22 doesn't work correctly... :/
OH! I see what's wrong, I did AllowOverride Alll on accident, I put one too many L's. Fixed and working.