Home Forum
2024-12-21
Benvenuto, Ospite
Nome Utente Password: Ricordami

redirect creates loop
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: redirect creates loop

redirect creates loop 12 Anni, 6 Mesi fa #3287

Hi, First of all: thank youi for this fantastic plugin. Nice work!!!!

Now my query:

I need to redirect:

www.mysite.nl/shop/overgordijnen/gordijnen/5968-jab-alassio-1-7786
to:
www.mysite.nl/nl/component/virtuemart/overgordijnen/gordijnen/jab-alassio-1-7786 ?item=0
5968-jab-alassio-1-7786 is dynamic but I need to remove the first four numbers plus '-'.

so her is what I have done:
from:
shop
to:
{host}/nl/component/virtuemart/overgordijnen/gordijnen/{pathltrim /shop/overgordijnen/gordijnen/{preg_match 1}[0-9][0-9][0-9][0-9]{/preg_match}-} ?Itemid=0

I would like to leave the /overgordijnen/gordijnen/ untouched as this is dynamic too but I do not know how to get to the numbers section.


These rules return a faulty URL:
www.mysite.nl/nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//nl/component/virtuemart/overgordijnen/gordijnen//shop/overgordijnen/gordijnen/5968-jab-alassio-1-7768%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20%5B0-9%5D%5B0-9%5D%5B0-9%5D%5B0-9%5D%7B/preg_match%7D-%7D%20?Itemid=0


Thanks.
Ultima modifica: 12 Anni, 6 Mesi fa Da bitstomper.
L'Argomento è stato bloccato.

Re: redirect creates loop 12 Anni, 6 Mesi fa #3288

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Sorry,
but is not so clear what you need. Consider that the destination URL must exists (i.e. if you call it from a browser you must get an existing page).

So, could you please, send me some real examples of full source URLs and corresponding destinations? If you prefer, send me an email at info(at)sistemistica.it.

Kind regards,
Luigi
L'Argomento è stato bloccato.

Re: redirect creates loop 12 Anni, 6 Mesi fa #3289

I got it:

To field is now: www.mysite.nl/nl/component/virtuemart/overgordijnen/gordijnen/{preg_match}/jab.*/{/preg_match} ?Itemid=0

result is now correct.

now all I need is to make the /overgordijenen/gordijnen/ call from the URL (as it is dynamic).

Hmm, still can not get my head around it.

THe above solution is not dynamic enough.

So:

In case url includes XXXX-name got to page: www.mysite.nl/nl/component/virtuemart/cat1/cat2/name-type

XXXX-name is dynamic, however the format is always the same.
name is only 7 possibilities so I am happy to set up 7 rules.

So the from URL should include 'shop' and 'name' - what is the regex for this?

The TO page needs to include cat1 and cat2 from the FROM URL as well as the name and following type.

eg.

originial URL: www.mysite.nl/shop/cat1/cat2/XXXX-jab-type
destination URL: www.mysite.nl/nl/component/virtuemart/cat1/cat2/jab-type ?item=0

is the building of the destination URL such that it runs through macros one at a time and applies them such that the second macro is applied to the result of macro 1 or is it applied to original URL?
So: www.mysite.nl/{macro1}{macro2} => macro2 is applied to the result of macro1, or macro2 is applied to original URL (as with macro1)?

thanks.
Ultima modifica: 12 Anni, 6 Mesi fa Da bitstomper.
L'Argomento è stato bloccato.

Re: redirect creates loop 12 Anni, 6 Mesi fa #3290

Another point:

I need to catch the cats from the original url and dump that in the destination URL;

So original can be: www.mysite.nl/shop/cat1/cat2/XXXX-....
or : www.mysite.nl/shop/cat1/cat2/cat3/XXXX-....

Where XXXX equals four numbers.

The new URL does not start with numbers after the categories.
So I want to do this:

catch all text after shop/ and before the first occurence of numbers.
L'Argomento è stato bloccato.

Re: redirect creates loop 12 Anni, 6 Mesi fa #3291

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi,
could you please, send me just an example (or more examples) of REAL source and destination URLs?

I need to call the URLs from my browser, so if you don't won't publish your site, send me an email.

Kind regards,
Luigi
L'Argomento è stato bloccato.

Re: redirect creates loop 12 Anni, 6 Mesi fa #3292

L'Argomento è stato bloccato.

Re: redirect creates loop 12 Anni, 6 Mesi fa #3293

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Ok for the source URL, but the destination doesn't work. I think a faster way to help you is you send me an email to info(at)sistemistica.it. Then we could chat on skype...

Kind regards,
Luigi
L'Argomento è stato bloccato.
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.45 secondi
Cerca con Google
News
Chi è online
 268 visitatori online
Sponsor

slotmachineaamsonline.com è una guida alle migliori slot machine online legali in Italia. Sul sito trovi un elenco sempre aggiornato dei casino online con Slot machine e bonus slot, le ultime novità dal mondo delle slot online e le migliori strategie per vincere. Inoltre, è disponibile una sezione dedicata alle slot machine da BAR che finalmente sono disponibili nella versione online.