IIS 7 and Above
URL Rewrite Module
Any alternative to replace original URL?
Last post May 10, 2020 10:44 PM by hrk
Dec 20, 2019 05:44 PM|hrk|LINK
Dec 23, 2019 06:36 AM|Yuk Ding|LINK
I'm just wondering why don't you just make change in the original URL Http://domain name/a number? Since redirection is pure client side operation, we will never be able to inject original URL to the redirection request via URL rewrite.
The only workaround to let this happen is when user access Http://domain name/a number. The server need to send a cookie to the client side with the original URL. Then you need to manual redirection to your custom error page. Because
its not possible to create error page for 200 response. Finally, you could let custom error page to make change and redirect to http://domain name?id=the number.
If the reply is helpful, it is appreciated if you could mark it as answer.
Dec 23, 2019 04:10 PM|hrk|LINK
Dec 25, 2019 07:51 AM|Yuk Ding|LINK
You need a specific page or route in your application for Http://domain name/a number instead of let IIS 404 to handle a non-exist page and do redirect. IIS itself are not able to inject cookie.
Please Use httpcookie class to create cookie.
Then read it from httpcontext.request.cookies dictionary.
Since there are tons of sample about how to send/read cookie, you may check that and then you will know how to apply that.
May 10, 2020 10:44 PM|hrk|LINK
Hi Yuk Ding:
Thank you for responding to my question.
I managed to work with the rewrite module finally but I had to be away from my work for long. Now because of the changes that I made to my windows 10 system with the rewrite module, I have a new problem and I hope it is appropriate that I continue in this blog.
After installation and configuration of the rewrite module, I realized that the MSWC.adRotator component does not work anymore on my computer although for a while it was working intermittently. I don't know if it makes sense to think that installation of
the rewrite module affected the MSWC on my system but I do not understand why now the adRotator does not work.
Initially, the adRot.dll was missing on my windows 10 system So I copied the old adrot.dll from my XP system and I installed it on my new windows 10 computer.
I don’t remember what method I initially used to install the adrot.dll which I had copied from my XP system. Now that the dll was not working anymore, I uninstalled the adrot.dll and I reinstalled it using the commands:
c:\windows\sysWin64 > Regsvr32 /u c:\windows\sysWin64.dll
c:\windows\sysWin64 > Regsvr32 c:\windows\sysWin64.dll
Now I did the same in c:\windows\system32 folder.
But the problem persists and the adRotator object is not created on my classic ASP page when executing the following line:
Dim myAds: set myAds = Server.CreatObjecy(“MSWC.adRotator”)
So that typename(myAd) return the string “Empty” and ads are not displayed. Also the error objectes throws “Object required” when the following line is executed:
Response.write myAd.getAdvertisement(valid path to file.txt)
Would you or any other expert be able to tell me why the adRotator object is not created anymore and how could I resolve this issue?
I am using iis10 on 64bits system to run 32bit classic ASP.
Your help is greatly appreciated.