Home Forum
2017-11-19
Menu principale
Prodotti
Giochi a premi
Accedi ai servizi
Newsletter
Ricezione
Benvenuto, Ospite
Nome Utente Password: Ricordami

two preg_matches
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: two preg_matches

two preg_matches 5 Anni, 2 Mesi fa #3389

  • ppeer
  • Offline
  • Fresh Boarder
  • Messaggi: 9
Hi Luigi,

I am trying to do a FROM TO 200 redirect as follow:

FROM:
huisx.nl/koop/rotterdam/kortekade
TO:
huisx.nl/index.php?option=com_logos&task=showResults&action=384&lqm_plaats=Rotterdam&lqm_straat=Kortekade

By using:
http://{siteurl}/index.php?option=com_logos&task=showResults&action=384&lqm_plaats={preg_match 1}/\/koop\/([a-z]+)\//i{/preg_match}&lqm_straat={preg_match 2}/\/koop\/([a-z]+)\//i{/preg_match}


It matches the "plaats" variable but won't match the "straat" variable. Any suggestions?

regard,
Peter

Re: two preg_matches 5 Anni, 2 Mesi fa #3390

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi Peter,
just a question. Looking at your rule it seems the redirect is dynamic, because you are trying to build the destination catching parts of source. But from your initial request:

FROM:
huisx.nl/koop/rotterdam/kortekade
TO:
huisx.nl/index.php?option=com_logos&task=showResults&action=384&lqm_plaats=Rotterdam&lqm_straat=Kortekade


I'm not able to understand which are the "variants" you wanna catch. Could you please be more detailed?

Kind regards,
Luigi

Re: two preg_matches 5 Anni, 2 Mesi fa #3392

  • ppeer
  • Offline
  • Fresh Boarder
  • Messaggi: 9
Ha Luigi,

The variants I want to catch from the source (FROM) URL are plaats (Rotterdam) and straat (Kortekade) or in plain English 'place' and 'street'. In the dynamic (TO) URL I would like to generate, those are the lqm_plaats (Rotterdam) and lqm_straat (Kortekade) variables.
Rotterdam and Kortekade are just variable input examples, but could be any of thousands of place/street combinations. In the FROM URL only the huisx.nl/koop/ part is fixed.

FROM: huisx.nl/koop/place/street
TO: huisx.nl/index.php?option=com_logos&task=showResults&action=384&lqm_plaats=place&lqm_straat=street


regards,
Peter

Re: two preg_matches 5 Anni, 2 Mesi fa #3394

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi Peter,
try this:

From URL: ^/koop/
To URL: http://{siteurl}/index.php?option=com_logos&task=showResults&action=384&lqm_plaats={preg_match 1}/\/koop\/([^\/]+)\//{/preg_match}&lqm_straat={preg_match 2}/\/koop\/([^\/]+)\/([^\/]+)/{/preg_match}


Not tested, so let me know if works!!!

Kind regards,
Luigi
Ringraziano per il messaggio: ppeer

Re: two preg_matches 5 Anni, 2 Mesi fa #3396

  • ppeer
  • Offline
  • Fresh Boarder
  • Messaggi: 9
works! e.g. huisx.nl/koop/rotterdam/honingerdijk
Luigi, thanks very much.

Re: two preg_matches 5 Anni, 2 Mesi fa #3397

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
U're welcome
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.41 secondi
News
Cerca con Google
Chi è online
 31 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.