I was recently asked to work on a site running FMyScript. The problem was this every time a voting link was clicked the link would just disappear and the votes were not updated.
The solution was two fold:
Part 1:
The first problem was the voting links has a ‘ in the string such as “I’m really sad to hear that” So I just changed the string instead of finding all the places I might have to escape it. I figured I am is better grammar anyways.
Part 2:
The domain must the config file. That means if you set up your site with the www in the url and someone goes to your site without the www in the url the voting system will not work.
I modified the .htaccess files to force www by adding the following lines:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.your_domain.com$
RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]
I hope this helps someone.
Hey Thank you for putting this up.
I tried to implement this solution but i have no idea when it comes to hta files.
since the fmyscript hta file comes with code, do you just add the three lines you wrote to the bottom of the file?
also, shouldnt the second line of this not include the www. part?
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.your_domain.com$
RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]
Thanks Sam!
Michael-
You can actually skip the “RewriteEngine on” because it is already in the .htaccess file.
RewriteCond %{HTTP_HOST} !^ http://www.myhighthoughts.com $
RewriteRule ^(.*)$ http://www.myhighthoughts.com /$1 [R=301]
and yes, you need the www. in the first part
Thanks a lot!!!!!! That was driving me crazy!!! thanks dude