1
votes

Hi I am getting 500 Internal server Error when am trying to run my code in wampserver which is working absolutely My .htaccess file is in wamp/www/site foloder and all other code is also in same folder so should i put site somewhere in .htaccess file because online my code is in root folder My .htaccess code:

RewriteEngine on
FileETag none

<IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_URI} /+[^\.]+$
    RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
</IfModule>

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript 
</IfModule>

Apache error is here:

J:/wamp/www/site/.htaccess: Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration, referer: /site/about/

1
RewriteEngine on FileETag none <IfModule mod_rewrite.c> RewriteCond %{REQUEST_URI} /+[^\.]+$ RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L] </IfModule> RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript </IfModule>M Patel
AddOutputFilterByType is now deprecated, depending on your config this may be the cause. Check out stackoverflow.com/questions/5230202/… for more infoTom Walters
Comment out <IfModule mod_deflate.c> blockanubhava

1 Answers

4
votes

If you are using apache 2.4, you need to change

<IfModule mod_deflate.c>

to

<IfModule mod_filter.c>

as the output filter has been moved to mod_filter. Then you need to make sure you have mod_filter loaded.