Search code examples
php.htaccesszen-cart

htaccess exclusion for a variable URL


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!


Solution

  • 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]