Rewrite-URLs-using-mod_rewrite-and-Apache

Error logs
.htaccess: Invalid command ‘SetEnv’, perhaps misspelled or defined by a module not included in the server configuration, referer:

The control of internal environment variables that are used by various Apache HTTP Server modules are controlled by the module mod_env.

By default module ‘mod_env’ will not be enabled in apache2.4. This will cause below error while using ‘SetEnv’ in htacess file.

Invalid command ‘SetEnv’, perhaps misspelled or defined by a module not included in the server configuration

To resolve this problem, we need to install the module ‘mod_env’ manually.

For easyapache4 users,

#yum install ea-apache24-mod_env.x86_64

By anup

Leave a Reply

Your email address will not be published. Required fields are marked *