Home Forum
2024-05-01
Benvenuto, Ospite
Nome Utente Password: Ricordami

Remove middle of URL
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: Remove middle of URL

Remove middle of URL 12 Anni, 4 Mesi fa #2852

  • Roman
  • Offline
  • Fresh Boarder
  • Messaggi: 6
I would like to remove only middle part of url( index.php/component/content/ ). I don't know what create it but I got a lot of error 500 on diferent pages. When I delete this part of url the pages showes normaly.

I tryed like this:

From:^index.php/component/content/
To:http://{siteurl}/{pathltrim /component/content/}

but problem is not solved.

Where is mistake?
L'Argomento è stato bloccato.

Re: Remove middle of URL 12 Anni, 4 Mesi fa #2855

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi,
your source URL has an "index.php" and then some "folders", so pathltrim could not work.

Could you please give me a full example (FROM URL -> TO URL) you need to redirect?

If you prefer, send me a private mail at info(at)sistemistica.it.

Cheeer,
Luigi
L'Argomento è stato bloccato.

Re: Remove middle of URL 12 Anni, 4 Mesi fa #2857

  • Roman
  • Offline
  • Fresh Boarder
  • Messaggi: 6
Ok, here is one example:

from: www.kalinero.si/index.php/component/content/kontakt
to: www.kalinero.si/kontakt

Instead of "kontakt" there are several diferent articles.

Is it normaly better to use 200 redirection instead of 301?
L'Argomento è stato bloccato.

Re: Remove middle of URL 12 Anni, 4 Mesi fa #2858

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi,
first let me say that the Internal Redirect is available only for Enterprise version, so for Community a 301 redirect is made.

About your redirect, try this:

From URL: ^/index.php/component/content/
To URL: http://{siteurl}/{pathltrim /index.php/component/content/}


Let me know if it works.
L'Argomento è stato bloccato.

Re: Remove middle of URL 12 Anni, 4 Mesi fa #2859

  • Roman
  • Offline
  • Fresh Boarder
  • Messaggi: 6
Thanks it works now

I have the Enterprise version so I'm still wondering which redirection is better to use?

Another problem from webmaster. Something on my site creates url's with doubled subfolder on the end of url.

Is there a makro that delete all doubled part of url's? Articles betveen are changing.

Example:
from: www.kalinero.si/index.php/pleskanje/18-slikopleskarske-storitve/pleskanje
to: www.kalinero.si/index.php/pleskanje/18-slikopleskarske-storitve

Here are same others also doubled url's

www.kalinero.si/index.php/galerija/61-svet-harmonije/galerija
www.kalinero.si/index.php/slikopleskarstvo/1-novice/49-vlaga-in-plesen-v-stavbi/slikopleskarstvo
www.kalinero.si/index.php/slikopleskarstvo-cenik/72/slikopleskarstvo-cenik
L'Argomento è stato bloccato.

Re: Remove middle of URL 12 Anni, 4 Mesi fa #2862

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
I have the Enterprise version so I'm still wondering which redirection is better to use?


It depends on what you really need. The 301 redirect is client side, so is the web browser that call the URL, receive information on the new destination and change the URL with new one.

The internal redirect, on the other hand, is server side and is totally transparent for user. He never know that the page has a different real URL. Usually this is very useful to create alias (e.g. short and friendly URL).

About second question, this should be a very clever macro...

Jokes apart, this should be first do at matching step (From URL) and this is the second request today to have a more flexible matching mechanism. I'm thinking about some kind of "conditions" to apply after the matching step. If condition fails, the next rule will be considered... it's an interesting feature.

Unfortunately at the moment you can't create a single universal rule, so you should create a rule for each redirect.

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