by KallistaAEnvarou » 02. December 2007 18:27
I'm getting this same error. The first time I tried to access the folder with the .htaccess file as it is on the live server I have running, I checked the logs, which said:
[Sun Dec 02 09:12:51 2007] [alert] [client 127.0.0.1] C:/xampp/htdocs/phplearningneeds/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Now, I know that RewriteEngine is valid since it works on my live server. Well, I took out that line and got this error:
[Sun Dec 02 09:15:52 2007] [alert] [client 127.0.0.1] C:/xampp/htdocs/phplearningneeds/.htaccess: Invalid command 'RewriteRule', perhaps misspelled or defined by a module not included in the server configuration
How can RewriteRule be an invalid command? Well, I took out that line and got this:
[Sun Dec 02 09:18:46 2007] [alert] [client 127.0.0.1] C:/xampp/htdocs/phplearningneeds/.htaccess: Invalid command 'RewriteCond', perhaps misspelled or defined by a module not included in the server configuration
Now, I also know that RewriteCond is valid, because it shows up in jungle green in my editor.
So I took out all my RewriteCond (aka bot forbidding) lines, and now it sort of works. The thing is, in addition to my bot prevention lines, my security requires:
RewriteEngine On
RewriteRule .* index.php [NC,L]
How do I fix this issue?