I have a Zen Cart site where I need to exclude one URL from being rewritten. The problem is that a part of the URL is different every time so I need some wildcard and I'm not sure how to do it.
This is how my URL looks like:
http://XXXXXX.com/index.php?zenid=9cbbba111d0e229809dbf5a0053c2486&main_page=wp_callback
The zenid
characters are different every time so I'd need a rule that would NOT rewrite URLs that end with main_page=wp_callback
.
Can anyone tell me how to do that, please? Thank you!
Try to add something like this above the other rewrite rules:
# Stop rewrite processing if the query string contains main_page=wp_callback
RewriteCond %{QUERY_STRING} main_page=wp_callback
RewriteRule . - [L]
Rewrite rules are regex. Here is the regex matching everything ending with main_page=wp_callback
:
index.php.*main_page=wp_callback$
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.