Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
Url Rewriting for a personnalized page
 
mysthr
Jr. Member
 
Total Posts:  5
Joined:  2009-09-18
 

hi,

I would like to create some RewritingRules to have a friendly url in the navigator.
For exemple I have a page for all my new products filtered by categories
I have created a simple module accessible through :

http://www.mysite.com/newproduct?cat=3

But I would like to be able to write an url like :
http://www.mysite.com/new-product-categoriename-3.htm

So I tried to write a RewriteRule in my .htaccess :

RewriteRule ^new-product-categoriename-([0-9]+).htm$ newproduct?cat=$1 [L]

But it doesn’t work and go to the 404 page.
Then I tried to write :

RewriteRule ^new-product-categoriename-([0-9]+).htm$ http://mysite.com/newproduct?cat=$1 [L]

The page is accessible but in the navigator the url is http://www.mysite.com/newproduct?cat=3 although I would like it to be
http://www.mysite.com/new-product-categoriename-3.htm

I don’t know what can I do.
please help me

Cheers,

Mysth-R

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3078
Joined:  2009-02-26
Minneapolis MN
 

Hmm. I would think you need to create a Controller in your module to do the re-write.

Look at the CMS module.

http://docs.magentocommerce.com/

 Signature 

Brent W. Peterson

Easy store setup at Magento GO - Zero to Selling FAST! Click for a 30 days FREE!

- What am I working on now? Magento upgrade from 1.3 to EE 1.11 Lots of fun!
**Always remember to backup before trying anything new

==========
Follow me on Twitter @brentwpeterson

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
701238 users|925 users currently online|497292 forum posts