Support - Knowledge base

Giving you the answers you need

Why not try our knowledge base for instant help and advice to enhance your online experience with Register365? From within the knowledge base you can browse our frequently asked questions and find the right answers to help solve your queries.

Home  >  Scripting  >  Rewrite Scripts  >  View Article

Basic Magento rewrite.script

4*4*4*4*4*

Article

This forms the basis of Zeus' rewrite equivalent for the mod_rewrite code block. This assumes that Magento is installed in a folder called /magento/. The basis of the rule is that without a rewrite, the URL format is index.php/list/of/page/paths. Adding the rewrite options simply removes the index.php part.

match URL into $ with /js/  
if matched then goto END  
match URL into $ with ^/magento/(.*)  
if matched then  
    map path into SCRATCH:path from %{URL}  
    look for file at %{SCRATCH:path}  
    if not exists then look for dir at %{SCRATCH:path}  
    if not exists then set URL = /magento/index.php/$1  
endif

Rate This Article

How useful was this article?

Not useful A little useful Useful Very useful Everything I needed