Forum Moderators: phranque

Message Too Old, No Replies

.htaccess question

         

Aleister

7:33 pm on Sep 11, 2005 (gmt 0)

10+ Year Member



I have dealt with .htaccess and httpd.conf a lot in the past, but there is something I am not quite sure about.

I have a site which uses WordPress, and I am using .htaccess to make the links nice. So in other words, I have a big (but not huge) .htaccess file.

I know that this gets loaded anytime a page is called up.

I also have a forum, and some other sections which are not powered by WordPress, so they do not need those extra rewrite rules.

If I put a blank .htaccess in my forums directory, will it keep the forum pages from loading up the big (root dir) .htaccess?

I know the directives given to a sub-directory take precedence over ones in parent directories, but I was not sure if it would skip loading the one from the parent completely :) Thanks!

jd01

9:22 am on Sep 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, the first file will be read and the rules processed before loading the second file.

I usually try to get out of the first file as soon as possible in this situation. If you have a directory that will not need to be rewritten by the main file, better to tell it to stop:

RewriteRule ^forums/ - [L]

Put this at the top of your file and you should exit as soon as you hit it and move on to the next one... ( - means no rewrite )

Justin