Order of the htaccess that is not executed

1

After fighting a bit I managed to advance in the htaccess that I put here yesterday, and it has stayed like this:

# inicio del motor 

      RewriteEngine On
      RewriteBase / 

# evitamos que se entienda como amigable una url que existe como carpeta o como fichero

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

# añade la contrabarra al final de todas las url si no la lleva 

      RewriteRule ^(([a-z0-9\-]+/)*[a-z0-9\-]+)$ $1/ [NC,R=301]  

# convertimos las url 

      RewriteRule ^(.*)$          buscarFicha.php?slug=$1 
      RewriteRule ^contacto$      contacto.php

Now I find that the rewriterule of the contact never runs, putting www.miweb.com/contacto or whatever you put, it goes to buscarFicha.php .

I tried to put the flag [L] to both instructions, also to put them in reverse order, to evaluate first if I have contacted, and if not, to continue with the rest of instructions, but none has worked.

    
asked by Vera Canet 13.06.2018 в 23:03
source

0 answers