Problem Linking PrettyURL CMSMS Pages on Facebook
Posted: Wed Dec 21, 2011 3:12 pm
CMSMS 1.10.2 (but I also have the problem in earlier versions)
I am trying to add a link to a page on a site to Facebook (status update). I expect to see the page title, url, description, and thumbnails of the images from the CMSMS page.
If I do not use url rewriting, the images on the page are found by Facebook, and I see the link that I was expecting.
If I turn on any url rewriting, it doesn't work. I want to use mod_rewrite, and when I do Facebook sees the title, but not the description or thumbnails. When I run it through the Facebook Debugger, it returns the proper url and title, but the image that it looks for adds "/uploads/images/image_name.jpg" to the Pretty URL. So, instead of finding the image here:
mysite.com/uploads/images/image_name.jpg
it looks for it here:
mysite.com/pretty-url-page/uploads/images/image_name.jpg
and returns a 404.
I found that I could fix the problem by changing TinyMCE so it doesn't generate relative url's, but there are two problems with that:
1) CMSMS 1.10 ships with MicroTiny and doesn't allow for generating absolute urls
2) If I develop a site and move it, the pages have the development url hardcoded
So, my question is: is there a way I can set up the site or the config.php file so that Facebook sees the actual url for the image(s) in question? Or am I stuck using the out-of-the-box urls, or downloading/configuring TinyMCE on every site?
I know I may be comparing apples to oranges, but I don't have this problem with Joomla sites, which also use relative urls and mod_rewrite. I don't know enough about .htaccess files to figure out a potential solution, but I suspect that's where the answer lies.
Thanks!
I am trying to add a link to a page on a site to Facebook (status update). I expect to see the page title, url, description, and thumbnails of the images from the CMSMS page.
If I do not use url rewriting, the images on the page are found by Facebook, and I see the link that I was expecting.
If I turn on any url rewriting, it doesn't work. I want to use mod_rewrite, and when I do Facebook sees the title, but not the description or thumbnails. When I run it through the Facebook Debugger, it returns the proper url and title, but the image that it looks for adds "/uploads/images/image_name.jpg" to the Pretty URL. So, instead of finding the image here:
mysite.com/uploads/images/image_name.jpg
it looks for it here:
mysite.com/pretty-url-page/uploads/images/image_name.jpg
and returns a 404.
I found that I could fix the problem by changing TinyMCE so it doesn't generate relative url's, but there are two problems with that:
1) CMSMS 1.10 ships with MicroTiny and doesn't allow for generating absolute urls
2) If I develop a site and move it, the pages have the development url hardcoded
So, my question is: is there a way I can set up the site or the config.php file so that Facebook sees the actual url for the image(s) in question? Or am I stuck using the out-of-the-box urls, or downloading/configuring TinyMCE on every site?
I know I may be comparing apples to oranges, but I don't have this problem with Joomla sites, which also use relative urls and mod_rewrite. I don't know enough about .htaccess files to figure out a potential solution, but I suspect that's where the answer lies.
Thanks!