Apache server IF URI not working, how to fix it?

I'm making my first website and I have problem configuring my Apache server. I have the following code <IfModule mod_rewrite.c> RewriteEngine On </IfModule> <IfModule mod_headers.c> <If "%{REQUEST_URI} =~ m#^/kursevi/?$#"> Header always set X-Frame-Options "SAMEORIGIN" </If> <Else> Header always set X-Frame-Debug "%{REQUEST_URI}e" </Else> </IfModule> If I make request to let's say myDomain.com/kursevi/ I get "ELSE" response meaning X-Frame-Debug in header saying "/kursevi/". Why isn't then "IF" statement catching that? I also tried the following IF statement <If "%{REQUEST_URI} == '/kursevi' || %{REQUEST_URI} == '/kursevi/'"> But to no good.

Comment (0)

You’ll be in good company