Unable to get Products when click on category.
Code:
<?php
$_categories = Mage::getModel('catalog/category')->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('is_active', 1);
foreach ($_categories as $_category)
{
if($_category->getImageUrl())
{
$catimg = $_category->getImageUrl();
?>
<div class="category1">
<img src="<?php echo $catimg ;?>" alt="" />
<a class="cate_btn" title="View the products for this category" href="<?php echo $_category->getUrl($_category) ;?>">View</a>
</div>
<?php } } ?>
when i click on view,it leads to following url:
rtd/index.php/catalog/category/view/s/cat1/id/3/
This Page gives error Message as Following:
Whoops, our bad...
The page you requested was not found, and we have a fine guess why.
If you typed the URL directly, please make sure the spelling is correct.
If you clicked on a link to get here, the link is outdated.
What can you do?
Have no fear, help is near! There are many ways you can get back on track with Magento Store.
Go back to the previous page.
Use the search bar at the top of the page to search for your products.
Follow these links to get you back on track!
Store Home | My Account
Help me out guys ,I'M new To Magento ??