Redirect Rule Issue

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 24
Joined: 15 Feb 2013, 04:06

Redirect Rule Issue

18 Jul 2013, 05:59

Hi,

i am creating redirect for .pptx to docsetname(its GUID), i have checked my local dev and QA environment but server its giving problem. But server having 2000 query string rules also is there redirect to docsetname(its GUID) after adding new .pptx rules docset not able to opening its giving weppage not found error(i.e it looked like the user was getting redirected over and over in an infinite loop).Then i compare query string rule and .pptx rules one thing i forget it in .pptx rule end of the rule i missing "?". is this reason can i get above error.

Check my rule :

RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^try/1234/ABC\ Library/Credentials\ and\ Experience/1234\ Experience\ Industrial\ abc\.pptx$ /capital/GLibrary/15af43f7\%2D1625\%2D4381\%2D885c\%2D55299c087bae [NC,R=301,L,NE]

after adding "?"

RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^try/1234/ABC\ Library/Credentials\ and\ Experience/1234\ Experience\ Industrial\ abc\.pptx$ /capital/GLibrary/15af43f7\%2D1625\%2D4381\%2D885c\%2D55299c087bae? [NC,R=301,L,NE]

Please do the needful

Regards,
Ramesh

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Redirect Rule Issue

18 Jul 2013, 10:01

Hello, Ramesh

Can you please clarify a little further.
What URL you request and what result you expect?
What the actual result you get?

User avatar
Posts: 24
Joined: 15 Feb 2013, 04:06

Re: Redirect Rule Issue

18 Jul 2013, 10:52

Hi Anton,

Source Url: https://at.1234.com/try/1234/ABC Library/Credentials and Experience/1234 Experience Industrial abc.pptx

Redirect Url: https://at.1234.com/capital/GLibrary/15 ... 299c087bae

Rule is -

RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^try/1234/ABC\ Library/Credentials\ and\ Experience/1234\ Experience\ Industrial\ abc\.pptx$ /capital/GLibrary/15af43f7\%2D1625\%2D4381\%2D885c\%2D55299c087bae [NC,R=301,L,NE]

above rule is working in Dev and QA environment, but production environment giving following error
web page cannot find(it looked like the user was getting redirected over and over in an infinite loop) in production we have already 2000 query string rules which related to same 'GLibrary'

any help you could give would be appricated.

Note: In above rule i missing "?" end of statement

Regards,
Ramesh

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Redirect Rule Issue

22 Jul 2013, 05:27

Hello, Ramesh

Thanks for clarifying your scenario.
1. why do you use %2D instead of '-'?
2. please provide rewrite.log records for the non working request
3. do all other rules work fine on production?

User avatar
Posts: 1
Joined: 12 Aug 2013, 03:43

Re: Redirect Rule Issue

12 Aug 2013, 04:04

Hi Anton,

I am working on the same project with Ramesh and these Rules are working fine on our Dev Environment and as well as on our Testing Environment however, none of these Rules are working on our Production Environment. Here is a detailed reply to each of your questions:

1. For '-' , we have been using '%2D' since a long time and we have about 3000 existing Rules for which this encoding works fine. However, these working redirect rules were not for Documents.

2. We did enable logging in our current Release but since it's a Production environment, the log files that we got are 4GB in Size and we are unable to open them in Notepad, Notepad++, ULSViewer. Do you know of any such tool to read log files as big in size as ours?

3. None of our 21 Rules for documents[*.ppt] worked on our Production environment. And I don't think there's a syntax error anywhere because if there is one, all redirection rules break as we have experienced in the past since the 'httpd' config file gets corrupted. However currently, our old redirection rules are working but these newly added 21 Rules are not. :cry:

Here is the Rule we have added in our Production environment:

RewriteCond %{HTTPS} on
RewriteCond %{HTTP:Host} ^at\.1234\.com$ [NC]
RewriteRule ^try/1234/ABC\sLibrary/Credentials\sand\sExperience/1234\sExperience\sUtilities\.pptx$ /capital/GLibrary/029ef397\%2Df68c\%2D4fc3\%2D85b7\%2D4576deaacf61? [NC,R=301,L,NE]

Please let us know your thoughts on the same.
Any help would be highly appreciated! :)

Regards,
Karan

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Redirect Rule Issue

12 Aug 2013, 10:10

Hello, Karan

Ok, let's try to figure out the issue without logs...
First, can you confirm that once you add any other rule to the config it is applied and works fine? You can check it with some simple test rule like

RewriteRule testtest - [G]

Also, can you specify if you have these 3000 rules (as well as the new 21) in httpd.conf or in .htaccess.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 19 guests