URL Rewriting created problems with thumbnails
Posted: 2011-07-13 17:30
I've used ADDT Server Behavior to generate Thumbnails ( InterAkt probably looks the same:Server Behaviors->+->Developer Toolbox->File Upload->Show Thumbnail)
I have changed the way the links of my project look, using a .htaccess file like this:
old url:
new url:
but now the thumbnails I had aren't showing anymore: (must be because I'm using relative paths). Here is how ADDT code looks like:
// Show Dynamic Thumbnail
$objDynamicThumb1 = new tNG_DynamicThumbnail("", "KT_thumbnail1");
$objDynamicThumb1->setFolder("images/article/");
$objDynamicThumb1->setRenameRule("{rsArticle.Picture}");
$objDynamicThumb1->setResize(200, 0, true);
$objDynamicThumb1->setWatermark(false);
and lower in the php page to show the thumbnail:
<div><img border="0" src="<?php echo $objDynamicThumb1->Execute(); ?>" />bla bla bla
QUESTION: Is there a way to put absolute links here:
$objDynamicThumb1->setFolder("images/article/");
I've tried it, didn't work, or maybe i'm doing it wrong. Please give example.
Or if smbd has another solution, ANY SOLUTION, PLEASE POST, and stay on this topic cause i'll post answers quite fast.
I have changed the way the links of my project look, using a .htaccess file like this:
Code: Select all
RewriteEngine On RewriteRule ^page_name/([0-9-/|]+)/([0-9-]+)/?$ /Page.php?this=$1&that=$2 [NC,L]
Code: Select all
http://www.mysite.com/mypage.php?this=1&that=2
Code: Select all
http://www.mysite.com/keywords/this/that
// Show Dynamic Thumbnail
$objDynamicThumb1 = new tNG_DynamicThumbnail("", "KT_thumbnail1");
$objDynamicThumb1->setFolder("images/article/");
$objDynamicThumb1->setRenameRule("{rsArticle.Picture}");
$objDynamicThumb1->setResize(200, 0, true);
$objDynamicThumb1->setWatermark(false);
and lower in the php page to show the thumbnail:
<div><img border="0" src="<?php echo $objDynamicThumb1->Execute(); ?>" />bla bla bla
QUESTION: Is there a way to put absolute links here:
$objDynamicThumb1->setFolder("images/article/");
I've tried it, didn't work, or maybe i'm doing it wrong. Please give example.
Or if smbd has another solution, ANY SOLUTION, PLEASE POST, and stay on this topic cause i'll post answers quite fast.