WordPress / htaccess / Mod_rewrite – need help linking to non-wordpress script

Solution:

If you are using the generic htaccess file (above), you shouldn’t have any problem, since the line RewriteCond %{REQUEST_FILENAME} !-f set the condition that the request url (%{REQUEST_FILENAME}) is not a file (!-f) on the rewrite rule.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

If you are using the auto generated file, you can add that condition to the chain rule definition.

More info:

http://codex.wordpress.org/Using_Permalinks

http://httpd.apache.org/docs/current/mod/mod_rewrite.html