<IfModule mod_rewrite.c>

    # Turn on the Rewrite Engine
    RewriteEngine On

    # RewriteBase /


	# if this is request for system folder, and not for uploads folder inside it, reject
	RewriteCond $1 ^system
	RewriteCond $1 !^system/application/uploads
	RewriteCond $1 !^system/application/scripts/tiny_mce	
	RewriteRule ^(.+)$ index.php [R,L]

    # If the file or directory exists, show it
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]

    # Blank queries get sent to the index
    RewriteRule ^$ index.php [L]

	# requests for category by name
	RewriteRule ^listing/(.+)$ index.php?catalog/index/$1 [L]

	# requests for item by name
	RewriteRule ^article/(.+)$ index.php?post/review/$1 [L]
	
	# requests for rss
	RewriteRule ^rss/(.+)$ index.php?rss/index/$1 [L]
	
	# requests for static pages
	RewriteRule info/(.+) index.php?info/index/$1 [L]
	
    # All other queries get sent to the index as index.php/whatever
    RewriteRule ^(.*)$ index.php?$1 [L]

</IfModule>
