I'm having trouble getting my .htaccess to work with the Laravel PHP framework on Rackspace Cloud Server/Ubuntu 14/Apache 2.

Mod_rewrite is enabled using sudo a2enmod rewrite. I've reset and restarted Apache.

Virtual host:

<VirtualHost *:80>

ServerName example.com
ServerAlias www.example.com

ServerAdmin admin@example.com
DocumentRoot /var/www/example.com/public_html

<Directory /var/www/example.com/public_html>
  Options -Indexes
  AllowOverride All

#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined


I'm using the standard .htaccess setting recommended for Laravel; the same virtual host configuration and .htaccess work on a different Ubuntu 14/Apache 2 on my Rackspace account. (The only difference is the domain names.)


Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
  • When I go to a URL that should be redirected to the Laravel front controller I get a standard 404 error instead. – kirkaracha Dec 12 '14 at 23:27

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.