• Resolved leobaillard

    (@leobaillard)


    Hi!

    Our client is using the plugin to handle links with query string parameters containing square brackets ( [] ) (e.g /page.html?filter_name=Test&filter_brand[]=2&filter_type[]=&filter_price[]=&filter_range[]=&filter_size[]=&filter_loss[]=&filter_battery[]=).

    We would like to convert the redirections to htaccess to make some performance improvements (there is a _lot_ of redirections of the website) but when doing so, the RewriteCond generated does not escape the brackets, thus crashing the website because of the wrong htaccess syntax.

    The original redirection is not marked as a regex in the plugin and that’s why it is not escaped (my client imports their redirections from a flat file and does not know how to write regexed).

    My question then is: is this a bug, and if so, can it be fixed? If it’s not, is there a place where this use cas is covered in a doc?

    Edit: the problem also happens with spaces: they do not get converted to “%20” thus making the QUERY_STRING regex fail in the RewriteCond.

    Thanks a lot!

    • This topic was modified 2 years, 7 months ago by leobaillard.
    • This topic was modified 2 years, 7 months ago by leobaillard. Reason: added info about spaces
Viewing 1 replies (of 1 total)
  • Plugin Author John Godley

    (@johnny5)

    Having a lot of redirects doesn’t change the performance of the plugin – it will be constant. However, putting a lot of redirects into htaccess may slow down every request.

    Quite possibly the square bracket is not being saved properly in a htaccess file, I will need to investigate.

Viewing 1 replies (of 1 total)
  • The topic ‘RewriteCond error when switching to Apache format’ is closed to new replies.