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

redirect working wrongly in non sef to sef
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: redirect working wrongly in non sef to sef

redirect working wrongly in non sef to sef 14 Anni, 9 Mesi fa #391

  • 1985
  • Offline
  • Fresh Boarder
  • Messaggi: 4
Hello,

First of all thanks for the great extension. I use RedDJ and have solved some problems of mine but I face one serious problem and this is the reason I am sending.

I figured out that in order to redirect an non-sef joomla 1.0 version URL you need to add it like this
From URL: index\.php\?option=com_content&task=view&id=12
TO URL: test.html

When I type – www.mydomain.com /index.php?option=com_content&task=view&id=12&Itemid=43
The url is redirected correctly to www.mydomain.com /test.html

Now where is the problem? When I try to redirect the url: index\.php\?option=com_content&task=view&id=120 IT redirects it to test.html again! No matter what I write as id after 12, it redirects where the one with id = 13 redirects.

I guess I should add something after 12 at this url - index\.php\?option=com_content&task=view&id=12 in order for it to work. I tried to add (.*)\ but did not work.

Thanks on advance for your help!
L'Argomento è stato bloccato.

Re:redirect working wrongly in non sef to sef 14 Anni, 9 Mesi fa #392

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
You are right,
but what you need to put depends on what you want and this is not clear to me.

So I try to guess, and if I'm wrong... let me know.

From URL: index.php\?option=com_content&task=view&id=12
TO URL: http://{siteurl}/test.html

This match both the following:

www.mydomain.com/index.php?option=com_content&task=view&id=12&Itemid=43
www.mydomain.com/index.php?option=com_content&task=view&id=120

If you need to match ONLY the first one you can change as follow:
From URL: /index.php\?option=com_content&task=view&id=12&Itemid=43

If you need to match ALL AND ONLY the "id=12" you can change as follow:
From URL: /index.php\?option=com_content&task=view&id=12&

Let me know,
Luigi
L'Argomento è stato bloccato.

Re:redirect working wrongly in non sef to sef 14 Anni, 9 Mesi fa #397

  • 1985
  • Offline
  • Fresh Boarder
  • Messaggi: 4
Hello,

First of all thanks for your time and the help. I will try to explain what i need.

I want the url - www.mydomain.com/index.php?option=com_content&task=view&id=12&Itemid=43 AND www.mydomain.com/index.php?option=com_content&task=view&id=12
To be redirected to http://{siteurl}/test.html

Then i want the url www.mydomain.com/index.php?option=com_content&task=view&id=120
To be redirected to another url - http://{siteurl}/test2.html

So i think you got it write! But the problem is that the solution you sent me to add an '&' at the end of the url is NOT working!

I works if i type - www.mydomain.com/index.php?option=com_content&task=view&id=12&
But not for www.mydomain.com/index.php?option=com_content&task=view&id=12

If you can help, you save a life!

Thanks again for your time,
Dimitris
L'Argomento è stato bloccato.

Re:redirect working wrongly in non sef to sef 14 Anni, 9 Mesi fa #398

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Ok, I'll try to save your life...

You can add two entries, IN THIS ORDER:

Item 1:
From URL:
/index.php[[.question-mark.]]option=com_content&task=view&id=120

To URL: http://{siteurl}/test2.html

Item 2:
From URL:
/index.php[[.question-mark.]]option=com_content&task=view&id=12(&Itemid=43)*

To URL: http://{siteurl}/test.html

This because if more than one item matches with current URL, ReDJ takes the first one.

So when you call url with id=120, both match but item 1 is applied. And when you call the others, only item 2 matches.

In general, when you are not able to create a single regexp that matches all your needs, you can solve creating multiple items putting longest entries first.

Let me know if you are save now,
Luigi
Ultima modifica: 14 Anni, 8 Mesi fa Da admin.
L'Argomento è stato bloccato.
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.72 secondi
Cerca con Google
News
Chi è online
 75 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.