URLS not passing properly
Hi. Ok hopefully this will make sense while I figure out how to describe my issue.
Im using User Friendly SEOS via HTACCESS (Which works)
here is the code:
Options +FollowSymlinks
Options -Multiviews
RewriteRule ^Category/([^/.]+)/?$ /category.php?Categories=$1 [NC]
RewriteRule ^Product/([^/.]+)/?$ /product.php?Product=$1 [NC]
RewriteRule ^Article/([^/.]+)/?$ /dinky-article.php?Article=$1 [NC]
Therefore my URL is now:
http://www.dinkyfingerprintjewellery.co.uk/Category/Individual-Charm
if you look at this URL on th eright hand side under a set of links there should be some additional content displaying:
SIDE NOTE: If you look at this URL: http://www.dinkyfingerprintjewellery.co.uk/ordering.php you will see what content I mean (So I know it works in part since the right hand side content displays on this page)...it just doesnt display on any of my category pages
in the database the this additional content is selected via a field named "FeaturedLocale" - so for example for all my category pages (since im using HTACCESS to re-write the URLS the FeaturedLocale contains:
/Category/Individual-Charm
Category/Bracelets
Category/Cufflinks
SIDENOTE: my other pages (NOT User Friendly URLS) contain for example:
ordering.php
frequently-asked-questions.php
caring-for-your-silver.php
So those work,
Here is my RecordSet to display this content:
$basefile = basename ( $_SERVER["REQUEST_URI"] );
mysql_select_db($database_dinkydb, $dinkydb);
$query_rsFeatured = "SELECT * FROM featured LEFT OUTER JOIN products ON featured.FeaturedTypeID = products.ProductID WHERE FeaturedType = 1 AND FeaturedLocale = '$basefile'";
$rsFeatured = mysql_query($query_rsFeatured, $dinkydb) or die(mysql_error());
$row_rsFeatured = mysql_fetch_assoc($rsFeatured);
$totalRows_rsFeatured = mysql_num_rows($rsFeatured);
and the PHP to display the content:
<?php if ($totalRows_rsFeatured > 0) { // Show if recordset not empty ?>
<div class="clearfix"></div>
<div class="hide-mobile-bottom hide-mobile-side">
<div class="feature-heading">Featured Products</div>
<?php do { ?>
<p class="feature-name"><a href="../Product/<?php echo $row_rsFeatured['ProductLink']; ?>"><?php echo $row_rsFeatured['ProductName']; ?></a></p>
<div class="clearfix"></div>
<p class="feature-price">From £<?php echo $row_rsFeatured['ProductPrice']; ?></p>
<p class="feature-image"><a href="../
Product/<?php echo $row_rsFeatured['ProductLink']; ?>"><img src="../images/products/large/<?php echo $row_rsFeatured['ProductImage']; ?>" width="250" alt="<?php echo $row_rsFeatured['ProductImageTitle']; ?>"/></a></p>
<?php } while ($row_rsFeatured = mysql_fetch_assoc($rsFeatured)); ?>
</div>
<?php } // Show if recordset not empty ?>
I just dont know what im doing wrong, well obviously it has to do with the HTACCESS User friendly URLS but how can I reference them when I need to store the page location in the database.
Im attaching a screenshot of the database records:
Chris