0

I'm trying to redirect a URL with a question mark, but it's not really classed as a parameter. I'm just not sure what query_string I would use if doing a mod_rewrite.

I would like to redirect:

/category/Product-Name?.html

To:

/category/Product-Name.html

Notice the only difference is the removal of the question mark.

Appreciate your help.

Thanks.

  • Found following thread which seems to be the closest to the problem above but still no luck - http://stackoverflow.com/questions/14165287/removing-trailing-question-mark-with-htaccess – Dave Collins May 30 '13 at 01:35

1 Answers1

0
RewriteCond %{QUERY_STRING} ^(\.html)$
RewriteRule ^(category/Product-Name)$ $1%1? [L]
Gerben
  • 16,747
  • 6
  • 37
  • 56