WP ignores querystring variables when using Mod_Rewrite?
Weird problem. I have this RewriteRule in my htaccess file:
RewriteRule ^participants/profile/([^/]*)/([^/]*)/? /index.php?page_id=83&profile=$1&title=$2 [NC,L]
If the condition is matched, I’ll be sent to page 83 correctly, but the extra querystring variables are GONE (I’ve printed out $wp_query->query_vars to make sure).
Here’s why I’m stumped… entering something like
www.mysite.com/index.php?page_id=83&profile=42&title=deep-thoughtdirectly into the browser WORKS… just not when using the htaccess RewriteRule.
$wp_query->query_vars grabs the extra variables exactly as expected… but only when you enter the URL directly. When using a RewriteRule, the extra variables are lost.
Any ideas on how to get around this?
- The topic ‘WP ignores querystring variables when using Mod_Rewrite?’ is closed to new replies.