I am using rewrite_rules_array to rewrite the pages on my site. I have recently added a 2 char prefix to the site. There are a whole host of these such as shown below
function my_add_rewrite_rules( $rules ) { $new_rules = array(); ... quite a few rules here $new_rules['^([a-z]{2})/(.*)/?$'] = 'index.php?name=$matches[2]&cscountry=$matches[1]'; ... and a load more $new_rules = $new_rules + $rules; return $new_rules; } add_action('rewrite_rules_array','my_add_rewrite_rules'); The rewrites are all working fine and when searching the site without the prefix the pages end at the search page using /?s=term
When using a prefix e.g. https://site.com/aa/?s=term I get a 404 not found.
When debugging and checking in class-wp-query.php the query var is lost on the redirects.
Any ideas?
The page I need help with: [log in to see the link]
مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد
منبع: انجمن وردپرس