Home Forum
2012-02-05
Menu principale
Prodotti
Giochi a premi
Accedi ai servizi
Newsletter
Ricezione
Benvenuto, Ospite
Nome Utente Password: Ricordami

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

ARGOMENTO: redirect question

redirect question 2 Anni, 3 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)

Re:redirect question 2 Anni, 3 Mesi fa #635

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

Re:redirect question 2 Anni, 3 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!

Re:redirect question 2 Anni, 3 Mesi fa #643

  • admin
  • Offline
  • Administrator
  • Messaggi: 1323
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: 2 Anni, 3 Mesi fa Da admin.

Re:redirect question 2 Anni, 3 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.

Re:redirect question 2 Anni, 3 Mesi fa #648

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

Re:redirect question 2 Anni, 3 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.

Re:redirect question 2 Anni, 3 Mesi fa #650

  • admin
  • Offline
  • Administrator
  • Messaggi: 1323
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
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.72 secondi
News
Cerca con Google
Chi è online
 47 visitatori e 1 utente online
Pubblicità