Link bali directory fixed

After several months wandering around in 404 realm, finally find the fix for bali directory link, the link is using wp link exchange plugin (the developer site is not active anymore).
The problem was started when i upgrade the wordpress engine, and the bali directory suddenly gone 404.
The problem is in the htaccess inside the directory folder

RewriteRule ^categories/(.*)/(.*)$ index.php?cat=$1&page=$2 [QSA,L]
RewriteRule ^subcategories/(.*)/(.*)/(.*)$ index.php?cat=$1&scat=$2&page=$3 [QSA,L]

htaccess code above return error 404 for all links after the url , the fix is to add directory before the index.php

RewriteRule ^categories/(.*)/(.*)$ directory/index.php?cat=$1&page=$2 [QSA,L]
RewriteRule ^subcategories/(.*)/(.*)/(.*)$ directory/index.php?cat=$1&scat=$2&page=$3 [QSA,L]

Meanwhile in my wordpress installation is

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress