Home Forum
2012-02-05
Menu principale
Prodotti
Giochi a premi
Accedi ai servizi
Newsletter
Ricezione
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 2 Anni 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?

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

  • admin
  • Offline
  • Administrator
  • Messaggi: 1323
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

Re:*.php?ID= won't redirect/when to change .htaccess 2 Anni 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

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

  • admin
  • Offline
  • Administrator
  • Messaggi: 1323
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

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

  • annita
  • Offline
  • Fresh Boarder
  • Messaggi: 3
thank you, it works!
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.49 secondi
News
Cerca con Google
Chi è online
 49 visitatori e 1 utente online
Pubblicità