I must view my WordPress blog (set up in the blog/ folder) by being able to access the various address (say, blog-test). The issue is, that Web addresses of my website are processed by single primary.php script, which loads other modules with respect to the parameters passed.

My website is running under Apache server. It will come in two languages and it has multiple sections. Just about all demands have the type of example.com/lang/section/page and many of them are passed to main.php script (aside from direct demands to existing files). This is actually the items in the .htaccess file:

RewriteEngine on

RewriteBase   /

RewriteCond   %{REQUEST_FILENAME}            -f
RewriteRule   ^(.*)                          - [L]
RewriteCond   %{REQUEST_FILENAME}            -d
RewriteRule   ^(.*)                          main.php?lang=ns&page=$1 [L]

RewriteRule   ^((en|ru)/)?gallery/(.*)\.jpg  images/gallery/$3.jpg [L]

RewriteRule   ^$                             home    [R,L]
RewriteRule   ^(.*)/$                        $1      [R,L]
RewriteRule   ^(en|ru)$                      $1/home [R,L]
RewriteRule   ^(.*)\.[^\./]+$                $1      [R,L]

RewriteRule   ^(en|ru)/([^/]*)/(.*)          main.php?lang=$1&page=$2&addr=$3 [L]
RewriteRule   ^(en|ru)/(.*)                  main.php?lang=$1&page=$2 [L]
RewriteRule   ^([^/]*)/(.*)                  main.php?lang=ns&page=$1&addr=$2 [L]
RewriteRule   ^(.*)                          main.php?lang=ns&page=$1

Therefore the request /special-page is changed into /main.php?lang=ns&page=special-page, as well as in the primary.php there's something similar to the next:

if( $page == "special-page" ) { 
    require( "includes/very-special-page.php" );
    exit;
}

It really works fine, although not for that WordPress. This:

if( $page == "blog-test" ) { 
    require( "blog/index.php" );
    exit;
}

provides me with looped redirects (301: blog-test -> blog-test/ + 302 found, location: blog-test). I am getting rid of trailing slashes from the URL with my .htaccess, and want to possess the blog address with no slash too.

I've attempted different configurations for that Site address (URL) within the WordPress dashboard, in addition to some simple .htaccess-es within the blog folder - still no success.

Any ideas?