manecruz Posted July 2, 2016 Share Posted July 2, 2016 Muy buenas a todos, llevo tiempo buscando informacion de como redireccionar con .htaccess una vieja tienda que tenemos en ASP a prestashop. Os indico lo que necesitamos por si alguien nos puede ayudar. direccion vieja: midominio.com/default.asp?ref=REFERENCIA y necesitariamos redireccionar a una busqueda en prestashop tipo: midominio.com/index.php?controller=search&searh_query=REFERENCIA Esto es lo principal, en segundo lugar sería interesante que si la busqueda tiene un solo resultado que se cargara la ficha de ese producto. Me he cansado de buscar pero no he localizado nada parecido. A ver si nos podeis ayudar. Link to comment Share on other sites More sharing options...
codetheweb Posted July 2, 2016 Share Posted July 2, 2016 Ola: RewriteRule ^default.asp?ref=([a-zA-Z0-9-]+)$ /index.php?controller=search&searh_query=$1 [L,QSA] Regards, 1 Link to comment Share on other sites More sharing options...
Santori Posted July 2, 2016 Share Posted July 2, 2016 A ver prueba con esto <IfModule mod_rewrite.c>RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_URI} (.*)/default.asp?ref=$ RewriteRule (.*) http://www.midominio.com/index.php?controller=search&searh_query=$1/ [R=301,L,QSA] </IfModule> o RedirectMatch 301 ^/default.asp?ref=(.*)$ midominio.com/index.php?controller=search&searh_query=$1 Link to comment Share on other sites More sharing options...
manecruz Posted July 4, 2016 Author Share Posted July 4, 2016 Gracias voy a probarlo y os comento. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now