Skip to content

Instantly share code, notes, and snippets.

@anton-johansson
Created November 23, 2016 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anton-johansson/d2ee4fc975657b6c2081836091c67fed to your computer and use it in GitHub Desktop.
Save anton-johansson/d2ee4fc975657b6c2081836091c67fed to your computer and use it in GitHub Desktop.
URL-rewrite issue

I have this rule:

	<rule>
		<name>Receipt</name>
		<from>^/receipt$</from>
		<to last="true">/modules/confirmation.do</to>
	</rule>

I then go to the following URL:

http://localhost:8087/receipt?location=http%3A%2F%2Flocalhost%3A8087%2Fapi%2Freceipts%2FXXYYZZ

Since I do not have qsappend="true", I expect the final URL to be just:

http://localhost:8087/modules/confirmation.do

But it is fact:

http://localhost:8087/modules/confirmation.do?location=http%3A%2F%2Flocalhost%3A8087%2Fapi%2Freceipts%2FXXYYZZ

If I then add qsappend="true", I get double parameters, like this:

http://localhost:8087/modules/confirmation.do?location=http%3A%2F%2Flocalhost%3A8087%2Fapi%2Freceipts%2FXXYYZZ&location=http%3A%2F%2Flocalhost%3A8087%2Fapi%2Freceipts%2FXXYYZZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment