I need to create an .htaccess file to redirect friendly urls [closed]

1

I have a site in my hosting but I have an error when I click on my products, as you can see on my website.

I want to go to some product on my page, but the htaccess does not send me the view:

http://imnovesa.com/lineas_de_productos/iluminacion/iluminacion_convencional

That is, I need to create a friendly url for that route.

    
asked by Mayerson MEDINA 03.04.2018 в 01:16
source

1 answer

0

Assuming you are working with APACHE and PHP you can add the following rule to your .htaccess file to get:

http://imnovesa.com/lineas_de_productos/iluminacion/iluminacion_convencional

In summary you should add the following line to your file .htaccess

RewriteRule ^lineas_de_productos/(\w+)/(\w+)/?$ lineas_de_productos.php?cat=$1&subcat=$2
    
answered by 03.04.2018 в 18:48