[thelist] getting the server to add an '?' on the end of a url...

MarsHall evolt at marsorange.com
Thu Nov 14 15:46:01 CST 2002


On Thursday, Nov 14, 2002, at 15:03 US/Central, Dunstan Orchard wrote:
> a site I'm building relies on each url having an '?' at the end of it -
> preparatory to having variables tacked on the end.

I REALLY do NOT understand how adding a "?" will effect your ability to
add key/value pairs later! But mod_rewrite can do this for you
(assuming your Apache was built with mod_rewrite).

Put in your .htaccess file (this is untested, but should work):

	RewriteEngine on
	RewriteRule   ^(.+[^?])$   $1? [R,L]


Documentation can be found here:
	http://httpd.apache.org/docs/mod/mod_rewrite.html
and a real-world example guide here:
	http://httpd.apache.org/docs/misc/rewriteguide.html

Mars :)




More information about the thelist mailing list