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

redirect question
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: redirect question

redirect question 14 Anni, 7 Mesi fa #631

Hello,

I have changed the joomla installation folder from /en to /a. Now all the pages already indexed by google point www.abc.com/en/whatever.html and I get a 404 error. How can I redirect each www.abc.com/en/whatever.html request to its new location www.abc.com/a/en/whatever.html seamlessly (for the visitor)? Would your plugin do that?

I thank you in advance.

(urls given above, are not the real urls, and used just for example)
L'Argomento è stato bloccato.

Re:redirect question 14 Anni, 6 Mesi fa #635

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Using ReDJ you can configure redirect items as follow:

From URL: ^/en/whatever.html$
To URL: http://{siteurl}/a/en/whatever.html


Note the initial hypen in "From URL". It means "start with" and is needed to avoid loop, because "/en/whatever.html" matchs also with destination URL.

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

Re:redirect question 14 Anni, 6 Mesi fa #641

Hello Luigi,

Thank you very much for your reply!

Excuse my ignorance but:
- where do put this code?
- can I batch redirect like this?
From URL: ^/en/$
To URL: http://{siteurl}/a/en/

Thanks in advance!
L'Argomento è stato bloccato.

Re:redirect question 14 Anni, 6 Mesi fa #643

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
ReDJ have a plugin that must be enabled to do the work, and a component that lets you manage redirections. You should create an item like my example for each Google's error page. Your proposal:

From URL: ^/en/$
To URL: http://{siteurl}/a/en/


Will not work because with current ReDJ release, source URL is dynamic (you can use regular expressions), but destination URL is static, so all matching URLs will go to the same destination.

I plan to introduce dynamic destinations in the next ReDJ release.

Regards,
Luigi
Ultima modifica: 14 Anni, 6 Mesi fa Da admin.
L'Argomento è stato bloccato.

Re:redirect question 14 Anni, 6 Mesi fa #646

Thank you Luigi!

Dynamic urls would be awesome. I will wait for your next release. I cant create an error page for each item, as it is the whole site, with many pages. I will wait for google to clear its cache and reindex.

Great support. Keep up the good work.
L'Argomento è stato bloccato.

Re:redirect question 14 Anni, 6 Mesi fa #648

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Ok,
but meanwhile you can solve the problem using Apache mod_rewrite.

Something like this should work:

RewriteRule ^/en/(.*) /a/en/$1 [R]

More info here:

httpd.apache.org/docs/2.0/mod/mod_rewrite.html

Regards,
Luigi
L'Argomento è stato bloccato.

Re:redirect question 14 Anni, 6 Mesi fa #649

Hi Luigi,

This is great. Exactly what I was looking for.

Where do I paste this code? In the .htaccess file or the root directory?

Thanks a lot for the link.
L'Argomento è stato bloccato.

Re:redirect question 14 Anni, 6 Mesi fa #650

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Yes.
If you look at your Joomla home, there a htaccess.txt file, that can be renamed .htaccess (maybe you have done this yet).

You can add this rule as last one. Naturally, I'm assuming that your web server is Apache.

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