cancel
Showing results for 
Search instead for 
Did you mean: 

Clean Url to Magento Module

Clean Url to Magento Module

I want to do following this to url in my module 

 

Current URL: domain.com/modulename/?var=something
Wanted URL: domain.com/modulename/var/something

 

I edited .htaccess in magento root  to following code 

RewriteCond %{QUERY_STRING} ^var=(.+)$
RewriteRule ^(.*)$ http://domain.com/modulename/%1? [L,R=301]

 

Above htaccess rewriterule successfully let me redirect to url domain.com/modulename/var/something but It's showing not found page. 

Can anybody please let me know how to do this. 

 

Thanks

Nirmal (nirmalkirpa@gmail.com)
Magento Freelancer
1 REPLY

Re: Clean Url to Magento Module

Did you find a solution for this? 

 

Does your controller access that as a response?

Magento Moderator since 2009
Keep Calm and Clear Cache!