Grafyx89 Posted March 19, 2018 Share Posted March 19, 2018 (edited) Hello to all I want to redirect OsCommerce URL to Prestashop. I know that several links speak of this need but mine has a peculiarity, there was 3OsCommerce at the base (a main domain, 2 in subdomain of the principal). The 3 have been exported to a single Prestashop store. I made URL redirection attempts in the .htacces, but I still have access to the old ones, the redirection is not done. Mon code # Activation du module apache urlrewrite et définition du dossier de base du prestashop. RewriteEngine on RewriteRule . - [E=REWRITEBASE:/] redirect 301 /Lotion-Reparatrice-pour-peau-irritee-demangeaison-visage-et-corps-200ml-Odylique_12_19872 http://www.testonat.efilea.com/soins-du-visage-bio/19872-odyliqueodylique-lotion-reparatrice-pour-peau-irritee-demangeaison-visage-et-corps-200ml-5060099030055.html # Redirections produits RewriteCond %{HTTP_HOST} ^maindomain.fr$ RewriteCond %{HTTP_HOST} ^subdomain.maindomain.fr$ RewriteCond %{HTTP_HOST} ^subdomain2.maindomain.fr$ RewriteRule ^[a-zA-Z0-9-]*p-([0-9]+)\.html$ /index.php?id_product=$1&controller=product [R=301] # Redirection catégories RewriteCond %{HTTP_HOST} ^maindomain.fr$ RewriteCond %{HTTP_HOST} ^subdomain.maindomain.fr$ RewriteCond %{HTTP_HOST} ^subdomain2.maindomain.fr$ RewriteRule ^[a-zA-Z0-9-]*-c-[0-9_]+_([0-9]+)\.html$ %{ENV:REWRITEBASE}redirect_cat.php?id_category=$1 [L] #3 niveau RewriteRule ^[a-zA-Z0-9-]*c-[0-9]+_[0-9]+_([0-9]+)\.html$ /redirect_cat.php?id_category=$1 [R=301] #2 niveaux RewriteRule ^[a-zA-Z0-9-]*c-[0-9]+_([0-9]+)\.html$ /redirect_cat.php?id_category=$1 [R=301] #1 niveau RewriteRule ^[a-zA-Z0-9-]*c-([0-9]+)\.html$ /redirect_cat.php?id_category=$1 [R=301] Do you have any idea how to handle these? More information in PV (domains, etc.) If you have the time and want it Thank you all for your responses ! Edited March 19, 2018 by Grafyx89 (see edit history) Link to comment Share on other sites More sharing options...
Grafyx89 Posted March 26, 2018 Author Share Posted March 26, 2018 Hello Up ? Thx you Link to comment Share on other sites More sharing options...
SmartPlugs Posted April 2, 2018 Share Posted April 2, 2018 Hi, I would do that with a redirect module. I guess you already know you will get two redirect with the rule below (unless you don't enable rewritemod): RewriteRule ^[a-zA-Z0-9-]*p-([0-9]+)\.html$ /index.php?id_product=$1&controller=product Yann 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