#redirect the folder to reset page , that will handle redirect folder
DirectoryIndex index.html index.htm index.php index.shtml index.shtm index controllers/index.php

#rewrite the links
Options +FollowSymlinks
RewriteEngine off
RewriteRule ^([^/]+)$ controllers/$1.php [L]
RewriteRule ^([^/]+)/([a-zA-Z0-9\-]+)$ controllers/$1.php?ac=$2 [L]
RewriteRule ^([^/]+)/([a-zA-Z0-9\-]+)/([^/]*)$ controllers/$1.php?ac=$2&id=$3 [L]
RewriteRule ^([^/]+)/([a-zA-Z0-9\-]+)/([^/]*)/([^/]*)$ controllers/$1.php?ac=$2&id=$3&other=$4 [L]


#redirect the error pages
ErrorDocument 400 /obgy_app/core/404
ErrorDocument 401 /obgy_app/core/404
ErrorDocument 403 /obgy_app/core/404
ErrorDocument 500 /obgy_app/core/404
ErrorDocument 404 /obgy_app/core/404

#no one can open folders
Options -Indexes