0
votes

Ive searched the questions online and in the forums. Ive got a Joomla 2.5 site, with SEF on but the non SEF urls are still being picked up by Google.

Ive tried a number of rewriterules as I dont think you can process URLS with queries in using rewriterule.

Example url Im trying to redirect: hxxp://www.topdogsecurity.co.uk/staff/index.php?option=com_content&view=article&id=33&Itemid=216

In the simplest form Id like to push all urls containing queries to a SEF url such as hxxp://www.topdogsecurity.co.uk/detection-services/

Ideally Id like to be able to redirect to the exact article but at the moment just getting some redirect which rewrites the URL would be good. Sorry Im not good with htaccess and examples Im seeing are confusing more than anything

Id appreciate any assistance, on the command structure for the .htaccess (I cant leave it as it is)

K

Most recent tests:

RewriteCond %{QUERY_STRING} (?:^|&)option=com_content(?:&|$) RewriteRule (.*) http://www.topdogsecurity.co.uk/detection-services/ [R=301]

1
I wonder, if the SEF is on, where is Google getting non-SEF urls from ? Either it indexed them while your site hand SEF turned off or these are still present on your site. - piotr_cz

1 Answers

0
votes

You know that Joomla can work with non-SEF URLs even if SEF is enabled? So the non-SEF URLs always work and will point to the correct article.

The other way around is different: SEF URLs don't work and result in a 404 error if SEF is disabled. But this is not your issue.

In your case, you simply just don't need any special rules. All should work fine.