Mod_rewrite is stripping double slashes so that : http://mysite.com/search//10 Is producing the following $_SERVER variables: 'QUERY_STRING' => '/search/10', 'REQUEST_URI' => '/search//10' So when mapping a url to /search/search_term/results_per_page - the stripped slash means that it is interpreted as searching for "10" and not a blank search.
Seems like it may be an Apache issue - as when calling the index.php with the PATH_INFO also strips the slashes: http://mysite.com/index.php/search//10 produces the following: 'QUERY_STRING' => '', 'REQUEST_URI' => '/tmp/rewrite/index.php/search//10', 'SCRIPT_NAME' => '/tmp/rewrite/index.php', 'PATH_INFO' => '/search/10', 'PHP_SELF' => '/tmp/rewrite/index.php/search//10'
Created attachment 20363 [details] rewrite log - double slash already removed
Added the mod_rewrite log for the test URL: http://mysite.com/search/content//19 Which shows that the double slash is already removed from the path supplied to mod_rewrite. So it's *not* a mod_rewrite issue!
We must definitely review which environment variables we should canonicalize and which we shouldn't. In the mean time, the CGI Specification for further reference: http://hoohoo.ncsa.uiuc.edu/cgi/env.html *** This bug has been marked as a duplicate of 20036 ***