mod_rewrite rule to redirect all requests except for one specific path

The HTTP_HOST only contains the host name, not the path of the URL requested.

RewriteCond %{REQUEST_URI} !^/audio

Should be all you need.

Further, you can get debug info from the rewrite engine with the following, which is really useful to see how your conditions and rules are being matched:

RewriteLog /path/to/log/file
RewriteLogLevel 3

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)