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

*.php?ID= won't redirect/when to change .htaccess
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: *.php?ID= won't redirect/when to change .htaccess

*.php?ID= won't redirect/when to change .htaccess 14 Anni, 3 Mesi fa #987

  • annita
  • Offline
  • Fresh Boarder
  • Messaggi: 3
Dear Luigi,

Thanks for the great component. All off the desired redirections work perfectly, except two, they look like this: /ProdDetail.php?ID=37 (both have different ID numbers)
I want to redirect them to /artikelen.html. What's wrong?

And I don't understand what you mean by: "To redirect all the URLs included those one who would not be managed by Joomla! simply activate .htaccess standard Joomla! file, and add the following row to its:
ErrorDocument 404 / "

Can you explain in other words please? Like in what occassions is it necessary to change .htaccess and in what occassions not?
L'Argomento è stato bloccato.

Re:*.php?ID= won't redirect/when to change .htaccess 14 Anni, 3 Mesi fa #988

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Ok Annita,
I try to explain...

For your redirect, you should escape the question mark otherwise it will be taken in regular expression sense:

From URL: /ProdDetail.php\?ID=37

About the .htaccess file, that's what I mean. In some cases with a wrong URL, is Apache that return the error page (404 - Not Found). If you need to redirect these URLs using ReDJ, you can't do it. Just because ReDJ runs inside Joomla, but for these URLs, Apache doesn't pass the control to Joomla - it return the error by itself.

So, for these cases you can tell to Apache you want to manage the errors by yourself, specifying your custom error page. This is what ErrorDocument is for:

ErrorDocument 404 /

You are telling to Apache "everytime there's a wrong call with error 404 - Not Found, please pass the control to /", where there's is Joomla (and ReDJ) that can do the redirect.

I hope this was clear enough.

Regards,
Luigi
L'Argomento è stato bloccato.

Re:*.php?ID= won't redirect/when to change .htaccess 14 Anni, 3 Mesi fa #989

  • annita
  • Offline
  • Fresh Boarder
  • Messaggi: 3
Dear Luigi,

Thanks for your quick reply. I'm kind of new to all of this, so please tell me how can I escape the question mark?

Regards,
Annita
L'Argomento è stato bloccato.

Re:*.php?ID= won't redirect/when to change .htaccess 14 Anni, 3 Mesi fa #990

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi Annita,
no problem. It can be done just as indicated:

From URL: /ProdDetail.php\?ID=37


Take a look at the "backslash" just before the question mark.

URL not escaped: /ProdDetail.php?ID=37
URL escaped: /ProdDetail.php\?ID=37

Let me know if need more help.

Luigi
L'Argomento è stato bloccato.

Re:*.php?ID= won't redirect/when to change .htaccess 14 Anni, 3 Mesi fa #991

  • annita
  • Offline
  • Fresh Boarder
  • Messaggi: 3
thank you, it works!
L'Argomento è stato bloccato.
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.51 secondi
Cerca con Google
News
Chi è online
 107 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.