Internal Server Error "Invalid command 'RewriteCond%{REQUEST_FILENAME}"


Not sure if this is a typo, but you are missing a space in your RewriteCond :

RewriteCond %{REQUEST_FILENAME} file. ------------^

Also you need to enable the rewrite module for Apache :

a2enmod rewrite

Finally you need to activate the rewrite engine within your Apache config, before any other Rewrite directive :

RewriteEngine On


Related videos on Youtube

Nazmul Hossain
Author by

Nazmul Hossain

Updated on September 18, 2022


  • Nazmul Hossain
    Nazmul Hossain almost 2 years

    500 Internal Server Error.

    Need help for my website.

    .htaccess ---------

    [Sat May 09 01:35:16.765194 2015] [core:alert] [pid 671798] [client] /home/username/public_html/.htaccess: Invalid command 'RewriteCond%{REQUEST_FILENAME}', perhaps misspelled or defined by a module not included in the server configuration

    please help me

  • Agguro
    Agguro over 3 years
    RewriteEngine On did it for me, easy to overlook in some .htaccess files