Htaccess, getting a 404 error

In my web server there are the following folders:


On / there is an htaccess (please look at the bottom, I call it main htaccess), that does the following:

So when somebody entered (www) was redirected to (www) (but on the address bar was appearing just or

And it was working fine, perfectly...

Then for some other reasons I had to add an htaccess to the /forums/ folder (see below, I call it forum htaccess), and from this moment on I get a 404 error when I try to enter the following URLs:

What still continues working is:

I would like the redirect of "main htaccess" to work even if I have edited the "forums htaccess"...
but I have no idea how to do it, and what to change...

Thank you
main htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteCond %{REQUEST_URI} !^/forums/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /forums/$1
RewriteCond %{HTTP_HOST} ^(www.)?$
RewriteRule ^(/)?$ forums/index.php [L]

forum htaccess
RewriteEngine On
RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What do your Apache error logs say? That should tell you which of these rewrites is being requested and causing the 404 "not found" to arise.
ping_itAuthor Commented:
The logs are saying:

[Sun Apr 18 15:29:13 2010] [warn] RewriteCond: NoCase option for non-regex pattern '-f' is not supported and will be ignored.
[Sun Apr 18 15:29:13 2010] [warn] RewriteCond: NoCase option for non-regex pattern '-d' is not supported and will be ignored.
ping_itAuthor Commented:

I had to change:

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap|index)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
First try executig the code as windows/Apache Administrator. Also note that a change in Apache might require a restart.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.