We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

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?



5.1k

When I access https://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 https://docs.phalcon.io/en/latest/reference/apache.html
  2. Enable the mod rewrite:
    sudo a2enmod rewrite
    service apache2 restart


5.1k

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



1.3k

Hi, I'm have the same trouble. I checked this link: https://docs.phalcon.io/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 'https://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