Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

redirect every product to correct cart url
(1 viewing) (1) Guest
Support forum for customers who have purchased JoomSEF 3 (Joomla 1.5 compatible). Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: redirect every product to correct cart url

redirect every product to correct cart url 11 years, 7 months ago #33050

Hi,

the url for the cart without JoomSef is like this: index.php?option=com_virtuemart&page=shop.cart&product_id=9&Itemid=4

the correct url with JoomSef should be: /warenkorb

I want to redirect every product (if you click on "to shopping cart") to /warenkorb.
I found in JoomSef the Tab "Aliases" where i can enter all the urls i want to redirect. But i don't want a list with 1000 url's like:

index.php?option=com_virtuemart&page=shop.cart&product_id=1&Itemid=4
index.php?option=com_virtuemart&page=shop.cart&product_id=2&Itemid=4
index.php?option=com_virtuemart&page=shop.cart&product_id=3&Itemid=4
index.php?option=com_virtuemart&page=shop.cart&product_id=4&Itemid=4
index.php?option=com_virtuemart&page=shop.cart&product_id=5&Itemid=4

and so on...

Is there a possibility, to redirect all products in VM to one specific url?

Kind regards

nvmedia
The topic has been locked.

Re: redirect every product to correct cart url 11 years, 7 months ago #33069

  • dajo
  • OFFLINE
  • Posts: 5069
Hi,
You can achieve this only by create a custom rewrite rule in your .htaccess file. You need to use the RewriteCond directives to check for variables values and a RewriteRule directive for the redirect.
For a documentation see: httpd.apache.org/docs/current/mod/mod_rewrite.html
ARTIO Support Team
The topic has been locked.

Re: redirect every product to correct cart url 11 years, 7 months ago #33119

Hi dajo,

thank for the reply. I have no idea how to realize this or get the variables... can you help me give with an example code for the .htaccess please?

The base url is: www.izone24.de

The url for the cart is: www.izone24.de/warenkorb

I would be very glad if you could help me.


Kind regards - Jan
The topic has been locked.

Re: redirect every product to correct cart url 11 years, 7 months ago #33149

  • dajo
  • OFFLINE
  • Posts: 5069
Hi,

It should be something like:
RewriteCond %{QUERY_STRING} ^option=com_virtuemart&page=shop.cart&product_id=[0-9]+&Itemid=4$
RewriteRule .* http://www.izone24.de/warenkorb? [R=301,L]


I haven't tested it so maybe it's not entirely correct, but you should get an idea of how it works.
ARTIO Support Team
The topic has been locked.

Re: redirect every product to correct cart url 11 years, 6 months ago #33422

Great, thank you.It seems like it is working :-)

Great job :-)
The topic has been locked.
  • Page:
  • 1
Přihlášení uživatele Prázdný