Link to home
Start Free TrialLog in
Avatar of arthurh88
arthurh88

asked on

How to get the true URL off of a rewrite? ASP.NET

How can I get the "behind the scenes" URL that was sent to my page via a URL Rewrite?  The URL in the address bar is search engine friendly, but my application isn't working and I need to see what the actual URL was that was sent to it.

I use VB code...thanks!
Avatar of James Williams
James Williams
Flag of United States of America image

Do you have access to the server?  How are you browsing the site?
Are you a browsing as a visitor?

If you are just browsing http you will not find your answer as all Server side commands such as an URl rewrite are processed before you would see them.

If you have control  of the server look in the
Web.config file in the web root of the server
and post the URL rewrite part.

<Selvol
Avatar of arthurh88
arthurh88

ASKER

i do have access to the server.   but i want the vb code that returns the URL

Here is the rewrite rule:

 <rule name="RewriteByZip" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
                    <match url="^therapy/([^/]+)-(\d{5}$)" ignoreCase="true" negate="false" />
                    <conditions logicalGrouping="MatchAll" />
                    <action type="Rewrite" url="search-therapy/default.aspx?z={R:2}&amp;type={R:1}&amp;d=10" appendQueryString="true" redirectType="Temporary" />
                </rule>


so here is the url that I am passing

/therapy/counseling-10011&pg=2

I need to know what this URL "looks" like once its passed to the application
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yes that gave me the issue...it was putting a "&" instead of a "?" for the first querystring.