Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache not using mod_rewrite.c

Tags:

php

apache

debian

So I just setup a linode server with debian, apache, etc. and now I'm trying to get an app that I'm developing running, but it requires mod_rewrite.c. So naturally, I went to the directory of the application (happens to be in PHP if that matters) and created a .htaccess with this inside of it:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>

So they I headed over to my domain, example.com/hello, and it gave me a 404 error, when it should be showing me the content that index.php loads. Is there any reason why mod_rewrite.c wouldn't be working?

like image 328
Steve Gattuso Avatar asked Mar 01 '23 23:03

Steve Gattuso


1 Answers

Is the module enabled in /etc/apache2/mods-enabled?

like image 167
Paul Tomblin Avatar answered Mar 05 '23 18:03

Paul Tomblin