Web Connection
Url Rewrite
Gravatar is a globally recognized avatar based on your email address. Url Rewrite
  Marcel DESMET
  All
  Aug 12, 2019 @ 05:53am

Hello,

I use Url Rewrite to delegate handling of a request outside the process with a behavior for a specific extension ( .blog ). This gives some flexibility for url and multisite handling.

    <rewrite>
		<rules>
			<rule name="blog_rewrite" patternSyntax="ECMAScript" stopProcessing="true">
            <match url="^([A-z0-9/-]+)\.blog$" />
			<action type="Rewrite" url="UrlRewriteHandler.blog" appendQueryString="true" />
			</rule>
		</rules>
    </rewrite> 

It run's very well but just have a strange behavior the request href="article.blog?id=WW000000083" is displayed article.blog?id=WW000000083?id=WW000000083 ( see picture below ). It try to remove the appendQueryString="true" but nothing's changed ?

Thank you
Marcel

Gravatar is a globally recognized avatar based on your email address. re: Url Rewrite
  Mike McDonald
  Marcel DESMET
  Aug 12, 2019 @ 09:52am

Marcel -

It try to remove the appendQueryString="true" but nothing's changed ?

Instead of removing it, try setting it to "false" - the default value is "true" when this configuration option is not specified.

- Mike McDonald

Gravatar is a globally recognized avatar based on your email address. re: Url Rewrite
  Marcel DESMET
  Mike McDonald
  Aug 12, 2019 @ 11:06am

Mike Thank you for your reply, yes it's ok

But now there is a problem with QueryString the result lcId is empty !

lcId  = REQUEST.QueryString("id")

Marcel

© 1996-2019