4

The facebook comment plugin in my PHP site doesn't understand the URL in the href attrib and displays Warning: Link us unreachable. I have tested with a file that doesn't use .htaccess which runs good and doesn't throw any errors or warnings, but when I put a virtual URL on href. Facebook doesn't understand the url.

This is the code of my site:

    <script>(function(d, s, id) {

      var js, fjs = d.getElementsByTagName(s)[0];

      if (d.getElementById(id)) {return;}

      js = d.createElement(s); js.id = id;

      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";

      fjs.parentNode.insertBefore(js, fjs);

    }(document, 'script', 'facebook-jssdk'));</script><fb:comments href="<?php echo $commenturl; ?>"  num_posts="10" width="700"></fb:comments>

This is information in my site:

$commenturl = http://smashlix.com/battle/Ipad-or-Windows-8

.htaccess content: RewriteRule ^battle/(.*)$ ./index.php?view=bd&title=$1

Please help me !

Prakash K
  • 11,669
  • 6
  • 51
  • 109

1 Answers1

0

Your server responds with a 302 and a Location header, and an invalid one at that, because it does not contain a fully qualified URL: http://web-sniffer.net/?url=http://smashlix.com/battle/Ipad-or-Windows-8

RewriteRule ^battle/(.*)$ ./index.php?view=bd&title=$1

Why is there a ./ before the file name? Where is that .htaccess file located, and what’s the RewriteBase?

CBroe
  • 91,630
  • 14
  • 92
  • 150
  • because u just begin programing with php, and first use htaccess. You can explain for me more, Please.This is full my htacess file : Options +FollowSymLinks RewriteEngine On DirectoryIndex comingsoon.php RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^battle/(.*)$ ./index.php?view=bd&title=$1 How to facebook comment understand virture URL on href. Please help me ! Thanks a lot. – Một Phút Tầm Phào Dec 12 '12 at 09:06