How to Fix PHP SLIR from throwing 404 - File not found errors

If you are using SLIR, and you're getting 404 errors, it probably means mod_rewrite isn't working. And the reason it's not working is probably your apache httpd.conf file not allowing the .htaccess file in the /slir/ directory to override it.

Step 1: Check to make sure SLIR works using the query method.

Example:

<img src="/slir/?w=200&amp;i=/path/to/image.jpg">

If using the query method works, you know SLIR is working correctly.

Step 2: Check to confirm that the following doesn't work:

Example:

<img src="/slir/w200/path/to/image.jpg">

If using the method in Step 2 doesn't work, mod_rewrite is to blame.

Step 3: Open your apache httpd.conf file and look for a relevant <Directory> for your website.

Change this:

AllowOverride None

To this:

AllowOverride All

Step 4: Restart apache, and you should be good to go!

Chaska Feb 2, 2016

Thanks. You've been very helpful!

Leave a Comment