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

Groups of Redirects
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: Groups of Redirects

Groups of Redirects 12 Anni, 11 Mesi fa #2964

  • lu2chris
  • Offline
  • Fresh Boarder
  • Messaggi: 1
Thank you for such a great component!

My issue... I just got rid of sh404SEF and changed the url structure. I have been trying to redirect all our newsletters to the new url structure without having hundreds of individual redirects. I know this can be accomplished with this component, I just can't figure it out.

Old URL structure: {siteurl}/index.php?/Newsletters/newsletter-name-1.html
New URL structure: {siteurl}/resource-center/newsletters-archive/newsletter-name-1

I have tried everything I can find on the forum but nothing seems to work.

If I use:

From URL: /index.php\?/Newsletters
To URL: {siteurl}/resource-center/newsletters-archive{pathltrim /Newsletters}

all newletters go to the main newsletters page.

But if I want them to be redirected to their respected newsletter I try:

From URL: /index.php\?/Newsletters/
To URL: {siteurl}/resource-center/newsletters-archive/{pathltrim /index.php?/Newsletters/}{queryfull}

I get an error: The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

If I remove the {queryfull} it takes me to:
{siteurl}/resource-center/newsletters-archive///index.php

I'm sure it is an easy fix, but I just can't seem to figure it out. I will be very grateful of any help you can offer.

THANKS!!!
L'Argomento è stato bloccato.

Re: Groups of Redirects 12 Anni, 11 Mesi fa #2966

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi and thanks for using ReDJ.

Problem here is you can't use pathltrim macro, because the /Newsletters/newsletter-name-1.html is just a parameter (appears after index.php).

So, you could get the part you need newsletter-name-1 using preg_match, but this is only available in the Enterprise version:

From URL: /index.php\?/Newsletters/
To URL: http://{siteurl}/resource-center/newsletters-archive/{preg_match 1}/\/Newsletters\/([^\.]+)\.html/{/preg_match}


This should work.

Best regards,
Luigi
Ultima modifica: 12 Anni, 11 Mesi fa Da admin.
L'Argomento è stato bloccato.
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.38 secondi
Cerca con Google
News
Chi è online
 226 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.