i've got a effective utilization of mod_rewrite to create a site display as if only... however, i've migrated the 'mock-up' folder towards the root directory as well as in applying these rules for that site, some files aren't being offered within the ^ebooks folder:

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]

(old directory)

RewriteRule ^redesign_03012010/mock-up/([^/]+)/([^/]+)$ /redesign_03012010/mock-up/index.php?page=$1&section=$2 [PT]
RewriteRule ^redesign_03012010/mock-up/([^/]+)$ /redesign_03012010/mock-up/index.php?page=$1 [PT,L]

(new directory)

RewriteRule ^([^/]+)/([^/]+)$ /index.php?test=1&page=$1&section=$2 [PT]
RewriteRule ^([^/]+)$ /index.php?test=1&page=$1 [PT,L]

... ^ebooks (also known as /ebooks/) isn't serving the files... any suggestions?

[L] flag asks mod_rewrite to prevent processing the present algorithm, not the whole .htaccess file, therefore the following lines avoid the thing you need:

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]

You have to exclude existing files from being processed with mod_rewrite. Use this:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+)$ /index.php?test=1&page=$1&section=$2 [PT]
RewriteRule ^([^/]+)$ /index.php?test=1&page=$1 [PT,L]

not doing anything for me personally yet... this is actually the entire file:


RewriteEngine on
RewriteCond %{HTTP_HOST} ^getpearson.com$
RewriteRule ^/?$ "http\:\/\/www\.getpearson\.com" [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
RewriteRule ^redesign_03012010/mock-up/([^/]+)/([^/]+)$ /redesign_03012010/mock-up/index.php?page=$1§ion=$2 [PT]
RewriteRule ^redesign_03012010/mock-up/([^/]+)$ /redesign_03012010/mock-up/index.php?page=$1 [PT]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/([^/]+)$ /index.php?test=1&page=$1§ion=$2 [PT]
RewriteRule ^([^/]+)$ /index.php?test=1&page=$1 [PT,L]

please tell me if you're able to see what i am doing wrong... thanks!