Thanks! I’m going to guesstimate that that’s where your problem is. AddFunc Mobile Detect relies on WordPress’ default .htaccess script to execute it’s redirect at the right moment. If any other scripts run prior to this and send the header (starts the query response, if you will), then it is too late to return a redirect. The redirect is then ignored. The .htaccess file is read by the server first, before any .php files (in any query), so scripts within it take precedence over your WordPress install functionality in the event of conflict. You have a lot of scripts in your .htaccess file. That’s not necessarily bad, but it comes with it’s potential consequences, which can be hard to spot if you’re unfamiliar with what the .htaccess file does/can do.
This bit (which you have at the end of your .htaccess file) looks like WordPress’ default .htaccess script:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
IMPORTANT: Make a backup of your .htaccess file before making any changes.
Then…
You might want to try moving the above script higher up in your .htaccess file and seeing if that solves the issue. Or try moving other scripts below it.
I’m thinking it’s probably your <File>
tags that are preventing some of the <IfModule mod_rewrite.c>
from executing. But I’m not all that well versed in the language involved in .htaccess files myself. Personally, I try to leave the .htaccess file alone and stick with plugin solutions.
So that’s my advise. I’ll be very interested hear how it goes and what works for you when you resolve it. It might even be that you need your .htaccess file to remain as you currently have it and that AddFunc Mobile Detect isn’t the solution for you. But I’ve found that in most cases modifying the .htaccess file isn’t necessary with all the plugin solutions out there.
Hope that helps. Let me know how it goes.