怎么了? 什么都不会加载(几乎)!

Okay...My title is a bit of an exaggeration...

My site is built in PHP, and all the files I'm trying to "require_once" aren't being loaded. The only file I've changed is my .htaccess file. I don't know a thing about .htaccess and what I have is purely from searching the web. What is wrong? Thanks for any help in advance.

RewriteEngine on

<Files 403.shtml>
order allow,deny
allow from all
</Files>
ReWriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
ReWriteRule !index.php index.php [L]

Also, if I comment out the bottom two lines, my site works great.

Well, require_once has nothing to do with .htaccess file: it's a PHP directive, not an Apache one. You have to set correctly the include_path for your files and make sure these directories and files are reachable (i.e., with correct privileges set on them).

If you show the error message you got from failed require, it'd be much more simple to give you a specific advice on how to fix it.

UPDATE If what you need is redirecting all the non-AJAX requests for .php files into index.php, your .htaccess should like this:

RewriteEngine on

RewriteCond %{HTTP:x-requested-with} ^XMLHttpRequest$
RewriteRule . - [L]

RewriteCond %{REQUEST_FILENAME} !-d
ReWriteRule .php$ index.php

This basically means the following: "all AJAX requests - go for what you need, all non-AJAX requests IF you're not going for some directory and are ended with .php - go for index.php instead".

Without checking for .php (or some similar check) you will redirect to index.php all the script loading procedures; and, unless you do it from some external CDN, it's not what would work in your case. )

Try changing the last two lines to this:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

If you want your URL's to look something like this (you probably do):

http://yoursite.com/some/path/somewhere

then change the last line to:

RewriteRule ^([^/]*)(.*)$ index.php?first=$1&second=$2

If that's what you want to achieve, ensure that if you're trying to go to:

http://yoursite.com/about

That there isn't actually a folder called about, this line:

RewriteCond %{REQUEST_FILENAME} !-d

Checks to see if a folder with the name "about" exists, if it does, then the page will not redirect, the same goes for files, say you go to:

http://yoursite.com/about.html

If about.html actually exists then the page will not redirect.

Hope that makes sense.

If you need more information, http://jrgns.net/content/redirect_request_to_index seems to be fairly succinct and helpful.