.htaccess issue in apache2 localhost

Hi, there! I got some issue when trying to setup .htaccess on my localhost apache2 server. Without .htaccess all work properly. But when I add it i have got an error:

.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

I started looking for mod_rewrite and it enabled.
sudo a2enmod rewrite && sudo service apache2 restart
“rewrite” already present

in my vhost.d AllowOverride All is present too.
My .htaccess:

RewriteEngine On

*#Fix Rewrite*
Options -Multivews

*#Mod Rewrite*
Options +FollowSymLinks

RewriteBase /login_with_session/

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

*# used for php pages such as "yoursite.com/login.php" will become "yoursite.com/login/"*
RewriteRule ^([a-z_]+)\/?$ $1.php [NC]

I have read threads about this issue on this forum, StackOverflow and some proper blogs. But nothig from that can’t helped me. How I can fix this issue? I can work without it, but I’m studying and I wont to understand how this work. Thank’s is you just read this)

First, can you please post CODE without all the colours and italics? That isn’t in your file I assume and it makes reading realy difficult.

Then, I see the (grey) word


Shouldn’t that be



Yes, it shoud.
Thank’s a lot. The problem has solved.

Nice it is solved. It really helps sometimes to let another one look at something where you have looked already a 100 times :wink:

BTW, I see this is your first thread here. Welcome to these forums.

And as said above, you probably posted by copy/paste from some context sensitive editor. But it is really better to next time simply use the CLI from a terminal emulator and, in a case like this, use the cat statement:

cat .htaccess

I almost missed your typo because of the light grey colour.