Mod Rewrite Apache2.2.22 Problems...

October 22, 2013 4.1k 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.
7 Answers
Did you enable your site? What's in your /etc/apache2/sites-enabled directory?
default, and only that.
default, and only that.
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.
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!