<IfModule mod_rewrite.c>

    RewriteEngine On
    RewriteBase /papandayan/

    RewriteRule ^(papandayan(/index)?|index(\.php)?)/?$ / [L,R=301]
    RewriteRule ^(.*)/index/?$ $1 [L,R=301]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)/$ $1 [L,R=301]

    #RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC]
    #RewriteRule ^(.*)$ http://localhost/sinergi/$1 [L,R=301]

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]

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

</IfModule>

<IfModule !mod_rewrite.c>

    Error Document 404 /index.php

</IfModule>

