I am gradually moving my Wordpress site to ExpressionEngine. Because the majority of the site's submissions are in blogs, I'd rather not move that at this time and thus want the provide the primary area of the site from EE and also the blog from Wordpress but I am attempting to retain as most of the blog publish Web addresses as you possibly can.

All of the blogs have been in a high level category known as articles with Web addresses like /articles/publish-title/ or /articles/subcategory/publish-title/, and so i thought I ought to slowly move the Wordpress installation for an /articles/ folder. That's fine except I finish track of permalinks like /articles/articles/publish-title/ or maybe I go ahead and take category from WP's permalink structure, I recieve correct Web addresses for posts that do not have subcategories, although not for your which do.

And So I do need something during my .htaccess to rewrite /articles/articles/ to simply /articles/ or perhaps is my approach wrong with moving Wordpress into an /articles/ folder?

.htaccess for EE appears like

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
# Add a trailing slash to paths without an extension
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
RewriteRule ^(.*)$ /$1/ [R=301,L]
# Redirect index.php Requests
RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
RewriteCond %{THE_REQUEST} ^GET
RewriteRule ^index\.php(.+) $1 [R=301,L]
# Standard ExpressionEngine Rewrite
RewriteCond %{REQUEST_URI} ^/
RewriteCond %{QUERY_STRING} ^(gclid=.*)
RewriteRule ^(.+) /index.php?/ [L,PT]
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond  $1 !^(assets|min|system|themes|index\.php|admin\.php|favicon\.ico|index\.php|path\.php|php\.ini) [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteRule "(^|/)\." - [F]
</IfModule>

And Wordpress .htaccess (within the /articles/ folder):

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /articles/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /articles/index.php [L]
</IfModule>