sulman
sulman

Reputation: 2461

htaccess IfModule conditional fails

I have a basic .htaccess file. If I leave it empty the page loads correctly. If I have a conditional statement in there (e.g.:)

<IfModule mod_filter.c>
    #Intentionally left blank
</IfModule>

I get a 500 error.

So even though the mod_filter exists and is loaded it dies. Even though there is nothing in the IfModule statement.

It's almost as if the <IfModule> statement itself isn't working.

This is on 32bit WAMP on Windows.

I have other sites running locally that do have full htaccess files, and they work, but this one just won't play!

Any one seen this before?!

Upvotes: 4

Views: 196

Answers (3)

sulman
sulman

Reputation: 2461

This was due to a corrupted file. Recreating the file worked.

Upvotes: 1

user4899918
user4899918

Reputation:

Remove a space after mod_filter.c :)

Upvotes: 3

viral
viral

Reputation: 3743

You just need to remove the space as shown below after mod_filter.c

<IfModule mod_filter.c>
#Intentionally left blank
</IfModule>

Upvotes: 2

Related Questions