close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

URLS not passing properly

Thread began 9/12/2014 12:55 am by Christopher West | Last modified 9/12/2014 2:09 pm by Christopher West | 1253 views | 7 replies

Christopher WestCommunity Expert

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:

php:
$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:
<?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

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...