I currently have this type of URL and it works fine: www.example.com/flower
The full path of the example is:
www.example.com/indexmodelo.php?carpeta=flower
But previously the route was conformed through the IP instead of the FOLDER:
www.example.com/indexmodelo.php?IP=202
What I need to achieve is that when you write the current URL:
www.example.com/indexmodelo.php?carpeta=flower
Or the previous URL:
www.example.com/indexmodelo.php?IP=202
I'm going to the final URL:
www.example.com/flower
Currently in my .htaccess file says:
RewriteEngine on
Options -MultiViews
RewriteCond %{THE_REQUEST} \s/indexmodelo\.php\?carpeta=([0-9a-zA-Z_\-&=]+)\s [NC]
RewriteRule ^ /%1? [R=301,L]
RewriteRule ^([0-9a-zA-Z_\-&=]+)$ /indexmodelo.php?carpeta=$1 [L]
And I can not find a way to solve it. THANK YOU!