Canonical host changes unexpectedly

This is the place to discuss bugs that have been found in the most recent version of PivotX. Posting bugs will ensure that the Development Team is aware of them and that they will be addressed when resources are available.

Canonical host changes unexpectedly

Postby cing » Thu Jun 21, 2012 2:16 pm

I have a website that needs to be accessible from two different domains, let's call it

http://turtles.com/hungry/
and
http://hungryturtles.com/

The former is the original location and the latter is the domain with an A record that points to that location.

I believe Pivotx uses a "canonical host" in Advanced Configuration to know the root URL to write the correct links. If I set "canonical host" to be http://hungryturtles.com/ then this breaks the other URL that has the subfolder hungry. By break I mean that all the links are broken because it assumes my files are located at http://turtles.com/header.jpg instead of http://turtles.com/hungry/header.jpg . The opposite setup can also be done, breaking one but not the other.

I'm currently researching how to set this up, I'm guessing my .htaccess is not configured correctly or something.

I should mention that even when I'm logged in to my pivots admin at either http://hungryturtles.com/pivotx/ or http://turtles.com/hungry/pivotx/, I get the notification:
"You are currently logged in at a different host than your canonical host. If http://turtles.com/ isn't the canonical host you want, change it on the Advanced Configuration screen."
and similarly if I change the canonical host, I also get the notification:
"You are currently logged in at a different host than your canonical host. If http://turtles.com/hungry/ isn't the canonical host you want, change it on the Advanced Configuration screen."

Not sure what that really means, but the bug part comes about because the canonical host is changing unexpectedly. I have two accounts on my blog, an editor and an admin. When the user logs in to hungryturtles.com/pivotx/ and posts an article the canonical host reverts to http://turtles.com/hungry/ for some reason. Simply by logging into the admin account, not posting anything, the canonical host reverts it back to http://hungryturtles.com/.

Also, I'm using the newest version of Pivotx at the time of posting this.
cing
 
Posts: 2
Joined: Thu Jun 21, 2012 1:42 pm

Re: Canonical host changes unexpectedly

Postby Harm10 » Thu Jun 21, 2012 4:54 pm

I cannot explain the bug of changing without notice but you could use a rewrite rule in your .htaccess file to route the one address to the other. If you do you probably also solve your canonical host warning.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Canonical host changes unexpectedly

Postby cing » Thu Jun 21, 2012 6:58 pm

I can't reproduce my bug by posting as a user anymore so I'm not sure what the heck is going on!

I've settled on being happy with just one of the two URLs. One isn't indexed my Google anyway, so I think I'm in the clear for now :)
cing
 
Posts: 2
Joined: Thu Jun 21, 2012 1:42 pm

Re: Canonical host changes unexpectedly

Postby hansfn » Fri Jun 22, 2012 9:29 am

Yes, use one URL (and let the other rediret to the chosen one).

The canonical URL is used to choose between www.example.org and example.org - not between to completely different URLs.

PS! It's extremely bad SEO to use two domains. That Google haven't found the other URL yet, is just accidental. It's enough that someone points to the "wrong" URL in a tweet ... Redirection fixes the SEO issue.
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway


Return to 2.x Bugs

Who is online

Users browsing this forum: No registered users and 2 guests

cron