 RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /SM/index.php/$1 [L]
    ErrorDocument 404 /SM/index.php