Blog Tutorial Mod_rewrite error

I'm gettting Mod_rewrite error when I load the newly created project for the blog tutorial, yet i have mod_rewrite enabled

How's the error message? Pls mention your OS, PHP Ver, and phalcon version you are using. You have set AllowOverride All, right?



4.3k

When I access http://localhost/blog, I get:

Mod-Rewrite is not enabled

Please enable rewrite module on your web server to continue

OS: Ubuntu 13.04 64-bit PHP Version: 5.4.9 Phalcon Version: 1.1.0

Where should I set AllowOverride All?

  1. Adjust your apache configs in /etc/apache2/sites-available/default like in the http://docs.phalconphp.com/en/latest/reference/apache.html
  2. Enable the mod rewrite:
    sudo a2enmod rewrite
    service apache2 restart


4.3k

Thank you so much!!! I'm now flying with Phalcon :)



921

Hi, I'm have the same trouble. I checked this link: http://docs.phalconphp.com/en/latest/reference/apache.html My htaccess files look like this:

\var\www\tutorial.htaccess --- <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ public/ [L] RewriteRule (.*) public/$1 [L] </IfModule>

\var\www\tutorial\public.htaccess --- AddDefaultCharset UTF-8 <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L] </IfModule>

My sudo a2enmod rewrite reports: Model rewrite already enabled The web page at url 'http://localhost/tutorial/' is obviously showing the index.html, but the index.php is never loaded

This is Ubuntu 13.10, Apache2, Phalcon, Phalcon-DevTools, php5 Thanks for any help