Create a friendly URL like so:
RewriteRule ^productos Productos.php [NC,L]
but now I want to do a 301 redirect to midominio.com/Productos.php
so that whenever I type Productos.php
it redirects me tomidominio.com/productos
Create a friendly URL like so:
RewriteRule ^productos Productos.php [NC,L]
but now I want to do a 301 redirect to midominio.com/Productos.php
so that whenever I type Productos.php
it redirects me tomidominio.com/productos
In htaccess you could do it with Redirect, keep in mind that it must come before the previous rule so that products can be directed to Products.php. You can see more info here .
On the other hand, the normal thing is that it is not accessed by Products.php because all the links to your page should lead to products.
You can also do it in php: