Note that there are some explanatory texts on larger screens.

plurals
  1. POURL Rewriting and Facebook link information retrieval
    primarykey
    data
    text
    <p>I am developing a website and I want to integrate it with Facebook, allowing users to share the pages of my website in their FB walls. My problem is explained in the following lines and my question is at the end.</p> <p>I am using the following URL rewriting rule in my <code>.htaccess</code> file:</p> <pre><code>RewriteRule ^([a-zA-Z0-9_-]+)\/?([a-zA-Z0-9_-]+)\/?$ index.php?p1=$1&amp;p2=$2 </code></pre> <p>That means it will rewrite anything like: <a href="http://address/parameter1/parameter2" rel="nofollow">http://address/parameter1/parameter2</a> as <a href="http://address/index.php?p1=parameter1&amp;p2=parameter2" rel="nofollow">http://address/index.php?p1=parameter1&amp;p2=parameter2</a>.</p> <p>When I post <a href="http://address/parameter1/parameter2" rel="nofollow">http://address/parameter1/parameter2</a> on FB, it will only show the rewritten URL under that URL.</p> <p>I posted <a href="http://address/index.php?p1=parameter1&amp;p2=parameter2" rel="nofollow">http://address/index.php?p1=parameter1&amp;p2=parameter2</a> on FB, and it will show the information I want it to show, the ones I have put in the meta tags.</p> <p>I tried debugging <a href="http://address/parameter1/parameter2" rel="nofollow">http://address/parameter1/parameter2</a> on the FB debugger (http://developers.facebook.com/tools/debug), I will get the error: "The page at ... could not be reached because the server returned status code 400."</p> <p>Is there any way I can correct that? That is, actually making the dynamic link behave like a static link, and making that transparent to anyone who links it?</p> <hr> <p>Edit:</p> <p>This change in the rewrite rule should solve the problem: RewriteRule ^([a-z0-9_-]+)/?([a-z0-9_-]+)/?$ index.php?p1$1&amp;p2=$2 [L,NC]</p> <p>I also changed the redirects in PHP that I was doing.</p> <p>And that solved my problem.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload