By Sam Prescott
I installed LAMP on my droplet and then I followed this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite and I used the contents for the file from my old web hosting, so I know it works: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php [L,QSA]
However, if I enter for example http://cyan.red/index it comes up with: Not Found
The requested URL /index was not found on this server.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You know this command $ a2enmod rewrite is not mentioned in any DO tutorial, but without it I couldn’t enable .htaccess, now can, thanks
This thread was very helpful. It did the trick for me. Thanks to everyone! :)
None of this worked for me. What did work was to enable “AllowOverride all” in the apache2.conf file in /etc/apache2. For me it was on line 172 of that file. I tried everything else to eliminate my pages from giving a 404 when visiting pages but the homepage.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.