Link to home
Start Free TrialLog in
Avatar of pjordanna
pjordanna

asked on

Canonical Problem in Joomla - URL Rewrite

Hi Experts,

I'm having a problem with canonical URL's on my site hosted in Joomla. I switched one of my sites over to Joomla and the existing Google search results all point at http://www.domain.co.uk/page.php but when you click on them you just end up at http://domain.co.uk/ and not the specific page you wanted.

I used both suggestions below...

RewriteEngine On
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} ^domain\.co\.uk [NC]
RewriteRule (.*) http://www.domain.co.uk/$1 [R=301,L]

and

RewriteEngine On
Options +FollowSymlinks
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

Both caused the site to not display ("Internet Explorer cannot display the webpage" in IE). I could get to admin page & login but not hit the URL directly.

Any ideas??

PS. Running PHP 5.2.5 and not very eager to upgrade my version of Joomla.
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

In ...

RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]

what does the ! mean?
Ah Doh!

Sorry. Means NOT.
http://www.webweaver.nu/html-tips/web-redirection.shtml

The only difference is the (.*) => ^(.*)$ which should make no difference. Can you try this?
Avatar of pjordanna
pjordanna

ASKER

Hi there,

I made the change you suggested but with no success.


IE: Page can't be displayed

Firefox: The page isn't redirecting properly - Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I'm stumped :(
ASKER CERTIFIED SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial