The Joomla! Forum ™






Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Jun 28, 2012 9:00 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Feb 25, 2011 12:12 am
Posts: 12
I just upload a new website and when google its domain name, the search results shows some already existing sitelinks pointing to non-existing pages from the old site.

I have a 404 custom page to smooth the process, but I'd like to redirect this google sitelinks to new valid pages, so I've tried some code in the .htaccess but it looks that it doesn't work.

At first I tried the below code:
Redirect 301 /sitio/index.php?action=page_display&PageID=12 http://www.mydomain.com/es/newpage

But, according with I've read, this code just work for static html pages, so I tried this other code:

RewriteCond %{REQUEST_URI} /sitio/index.php
RewriteCond %{QUERY_STRING} t=action=page_display&PageID=12
RewriteRule (.*) http://www.mydomain.com/es/newpage [R=301,L]

But, It looks that it doesn't work too.

To testing, I'm just entering in the browser lines like mydomain.com/sitio/index.php?action=page_display&PageID=12 that corresponds with one of the sitelink address, but I'm not sure that it's the correct way to do the test!

Like you see I'm really confuse with this topic, so I really appreciate your guide.

By the way, I just upload a new website, but the domain name is the same!

Thanks for your help,

Best,

Dario P.


Top
 Profile  
 
PostPosted: Thu Jun 28, 2012 9:31 pm 
User avatar
Joomla! Guru
Joomla! Guru
Online

Joined: Tue Apr 17, 2012 11:28 am
Posts: 958
Location: Lincolnshire, UK
madaura

ive often found that using htaccess for redirects is often to complicated, depending on how confident you are using htaccess.

We prefer to use sh404sef to achieve the redirects you are looking for. However if you not looking to invest in a component you could use http://www.theartofjoomla.com/extensions/redirect.html if you are using Joomla 1.5 or in 2.5 the built in redirect tool.

regards

@bewebdev

_________________
Find us on twitter : http://twitter.com/bewebdev/
"We can work miracles, impossibles take a little longer."


Top
 Profile  
 
PostPosted: Fri Jun 29, 2012 3:34 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Feb 25, 2011 12:12 am
Posts: 12
bewebdev,

Totally agree with you about the htaccess file..

I'm using joomla 1.5 so I'm going to use the free extension that you recommend,

Thanks a lot for your oportune advice!

Best,

Dario P.


Top
 Profile  
 
PostPosted: Tue Jul 10, 2012 5:30 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Thu Sep 30, 2010 2:29 am
Posts: 447
Location: Europe
You might find the Phoca SEF component useful -> http://extensions.joomla.org/extensions ... ction/7025.
It
  • stores links from pages which end with 404 error,
  • redirects selected pages which ends with 404 error to new page,
  • stores referring sites.

Hope it helps,
regards.


Top
 Profile  
 
PostPosted: Wed Jul 11, 2012 4:55 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Feb 25, 2011 12:12 am
Posts: 12
fleischwolf,

Thanks a lot for your reply!

I already fixed my problem with the redirect extension, it has a similar functionality.

Thanks again for your help!

Best,


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 



Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group