Problems with Facebook comment plugin when using htaccess

The facebook comment plugin on my PHP site does not understand the URLs in the href attribute and displays Warning: Link us unreachable. I tested a file that does not use .htaccess, which works well and does not cause any errors or warnings, but when I put the virtual url in href. Facebook does not understand the URL.

This is the code for 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 the information on my website:

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

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

Please help me!

+4
source share
1 answer

Your server will respond with 302 and the Location header, as well as an invalid one, because it does not contain the full URL: http://web-sniffer.net/?url=http://smashlix.com/battle/Ipad-or- Windows 8

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

Why does the ./ file exist before the file name? Where is this .htaccess file located and what is RewriteBase?

0
source

All Articles