Htaccess, getting a 404 error

In my web server there are the following folders:

/
/forums/

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

So when somebody entered (www).mydomain.com was redirected to (www).mydomain.com/forums (but on the address bar was appearing just or mydomain.com.).

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:

mydomanin.com
www.mydomain.com

What still continues working is:
mydomain.com/index.php
www.mydomain.com/forums
mydomain.com/forums



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.)?mydomian.com$
RewriteCond %{REQUEST_URI} !^/forums/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /forums/$1
RewriteCond %{HTTP_HOST} ^(www.)?mydomian.com$
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

LVL 5
ping_itAsked:
Who is Participating?

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

x
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.

HackneyCabCommented:
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.
0
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.
0
ping_itAuthor Commented:
resolved

I had to change:

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

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

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
RajneshwarPrasadCommented:
First try executig the code as windows/Apache Administrator. Also note that a change in Apache might require a restart.
0
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
Networking

From novice to tech pro — start learning today.