[url]http://www.example.com/dev/article/final-fantasy-xiii-review-2[/url]
http://www.example.com/dev/article/final-fantasy-xiii-review-2
(rewritten URL)
[url]http://www.example.com/dev/article.php?p=4668[/url]
http://www.example.com/dev/article.php?p=4668
(actual URL)
Mod Rewrite Rules:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /dev/article/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /dev/article.php [L]
</IfModule>
I use the following code in article.php to figure out what article is being pulled:
$uri = str_replace("/", "", substr($_SERVER["REQUEST_URI"], 13));
$xg_article = getAllArticleInfoByName($uri);
And if it matters, pages are cached, but that shouldn't matter because both the actual and rewritten urls are cached (separately).
If you goto the
actual url the share tools (digg, reddit, facebook, twitter etc) work fine.
If you use the
rewritten url none of them work. For some reason they aren't able to connect to the page properly to grab info (or verify the page even exists) through the rewritten url.
I'm not really sure what is wrong, but it is kind of irritating that I can't figure out a solution. I'm not too familiar with mod_rewrite so I was hoping someone could help me fix it or direct me to some resources that might be able to help me out.
Thanx in advance,
Commander
[edited by: jdMorgan at 3:06 pm (utc) on Mar 28, 2010]
[edit reason] Use example.com only. Please see TOS. [/edit]