All,
[rant #4]The definition of an idiot is someone who repeatedly does the same thing expecting a different result. Asking Apache to confirm the existence of ANY module with an <IfModule> ... </IfModule> wrapper is the same thing in the webmaster world. DON'T BE AN IDIOT! If you don't know whether a module is enabled, run the test ONCE then REMOVE the wrapper as it is EXTREMELY wasteful of Apache's resources (and should NEVER be allowed on a shared server).
[/rant 4]
Okay, on to the code being attempted (DELETE the code in red):
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "(android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile)" [NC]
RewriteCond %{REQUEST_URI} !/news/.*$ [NC]
RewriteRule .* /news/ [R=302,L]
</IfModule>
# vs???
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I make these "corrections" every time I see the WordPress code. Hopefully, one day they will understand mod_rewrite code and I won't have to repeat this "repetitively." Please note that WP uses the <IfModule> wrapper to prevent annoying complaints from "webmasters" who do not understand .htaccess use. If mod_rewrite is enabled, it'll work. If it isn't, you'll get a 500 error and can eliminate the mod_rewrite code BECAUSE Apache does not recognize its directives.
To the OP's problem, I believe that the quotes were in error and a parenthetical was in order (to select one of the set of items within the parentheticals).
Regards,
DK
Bookmarks