Home Forum
2025-03-10
Benvenuto, Ospite
Nome Utente Password: Ricordami

Redirect of URL with redundant part
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: Redirect of URL with redundant part

Redirect of URL with redundant part 13 Anni, 10 Mesi fa #2150

  • dpared
  • Offline
  • Fresh Boarder
  • Messaggi: 4
Hi,

I would like to know if it's possible, with Enterprise version, to redirect URLs with a redundant part.

By example, I would like to redirect www.website.com/section/cat/cat?start=1 to www.website.com/section/cat?start=1, but not only for one specific URL but for all URLs with redundant part in it. Is it possible ?

Thanks for this great component !
L'Argomento è stato bloccato.

Redirect of URL with redundant part 13 Anni, 10 Mesi fa #2151

  • dpared
  • Offline
  • Fresh Boarder
  • Messaggi: 4
Hi,

Is it possible to redirect all URLs with a redundant part ?

By example, I would like to redirect www.website.com/section/cat/cat?start=1 to www.website.com/section/cat?start=1
L'Argomento è stato bloccato.

Re: Redirect of URL with redundant part 13 Anni, 10 Mesi fa #2152

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi and thanks.

By example, I would like to redirect www.website.com/section/cat/cat?start=1 to www.website.com/section/cat?start=1, but not only for one specific URL but for all URLs with redundant part in it. Is it possible ?


You would like to drop a part of URL (/section/cat/cat should be /section/cat). This is possible using ReDJ macros. The Community version has {pathrtrim} that could help you so maybe is not necessary to use Enterprise version (it has some more macros like preg_match, that allows to use regular expression). In your case this shoudl work:

From URL: /section/cat/cat
To URL: http://{siteurl}/{pathrtrim /cat/cat}/cat{queryfull}


Let me know if you need help.

Best regards,
Luigi
L'Argomento è stato bloccato.

Re: Redirect of URL with redundant part 13 Anni, 10 Mesi fa #2153

  • dpared
  • Offline
  • Fresh Boarder
  • Messaggi: 4
Thank you for your quick answer.

Your solution is fine if i can redirect URLs one by one, but i don't see how i can use it for all URLs with redundant part with only one item ?
L'Argomento è stato bloccato.

Re: Redirect of URL with redundant part 13 Anni, 10 Mesi fa #2154

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
This item:

From URL: /section/cat/cat

Match any url that contains this string inside, so can apply the drop rule for all matching URLs. If you would like to apply to a set of URLs, I need to know the full list the see if there's a common matching rule. Consider that the field "From URL" can be a regular expression...

L.
L'Argomento è stato bloccato.

Re: Redirect of URL with redundant part 13 Anni, 10 Mesi fa #2155

  • dpared
  • Offline
  • Fresh Boarder
  • Messaggi: 4
So, by example, i would to redirect
/section/abc/abc
and /section/def/def
with a single "From URL" regular expression (something like /section/[pattern]/[pattern]) or a single "To URL" macro.
L'Argomento è stato bloccato.

Re: Redirect of URL with redundant part 13 Anni, 10 Mesi fa #2156

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
If you need to redirect ALL sections the pattern could be "/section/", otherwise you should search a common pattern that include all and only the category you need. If this is not possible you can create more then one item, where any item can match one or more categories.

I hope this was clear. You can try by yourself with Community version.

Best regards,
Luigi
L'Argomento è stato bloccato.
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.45 secondi
Cerca con Google
News
Chi è online
 181 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.