How to write redirection rules with conditions?

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 16
Joined: 29 Apr 2013, 08:10

How to write redirection rules with conditions?

29 Apr 2013, 08:20

Hi,

I am facing some kind of issue while writing redirection rules for several urls --

OLD URL --

http://at.dev.com/knowledge/GeneralLibrary/Forms/Contribution/docsethomepage.aspx?ID=498&FolderCTID=0x0120D5200062DD9D17D8B6478E99DC2905AB6D50710033419241E09C254DA9964AC07C65C113&List=7e3c6d79-515c-45d4-b161-595d7b75e9a5&RootFolder=%2Fknowledge%2FGeneralLibrary%2F0BulkUpload

NEW URL --

http://at.dev.com/knowledge/GeneralLibrary/Forms/Contribution/docsethomepage.aspx?ID=493&FolderCTID=0x0120D5200062DD9D17D8B6478E99DC2905AB6D50710033419241E09C254DA9964AC07C65C113&List=7e3c6d79-515c-45d4-b161-595d7b75e9a5&RootFolder=%2Fknowledge%2FGeneralLibrary%2F7a948c564dd24d9a84f0ffa6595830f4

Rule which i have written --

RewriteCond %{QUERY_STRING} ^ID=498&FolderCTID=0x0120D5200062DD9D17D8B6478E99DC2905AB6D50710033419241E09C254DA9964AC07C65C113&List=7e3c6d79-515c-45d4-b161-595d7b75e9a5&RootFolder=%2Fknowledge%2FGeneralLibrary%2F0BulkUpload$ [NC]

RewriteRule ^knowledge/GeneralLibrary/Forms/Contribution/docsethomepage\.aspx$ http://at.dev.com/knowledge/GeneralLibrary/Forms/Contribution/docsethomepage.aspx?ID=493&FolderCTID=0x0120D5200062DD9D17D8B6478E99DC2905AB6D50710033419241E09C254DA9964AC07C65C113&List=7e3c6d79-515c-45d4-b161-595d7b75e9a5&RootFolder=%2Fknowledge%2FGeneralLibrary%2F7a948c564dd24d9a84f0ffa6595830f4? [NC,R=301,L,NE]

But some how it is not working...can you please help me to solve this problem?

Thanks,
Lalit Kumar Mishra

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: How to write redirection rules with conditions?

29 Apr 2013, 10:23

Hello,

The rule looks good. Try to enable logging and provide us with the rewrite.log for a testing request.
Logging issues are described in FAQ - http://www.helicontech.com/forum/10648-FAQ.html

Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 15 guests