Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0
 Helicon Tech : ISAPI_Rewrite 3.0
Subject Topic: 403.html File Location for Rule? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
dennisg
Groupie
Groupie


Joined: 14 May 2009
Online Status: Offline
Posts: 66
Posted: 27 July 2010 at 10:09am | IP Logged Quote dennisg

Hi there Anton.

I have the following rule:

RewriteCond %{QUERY_STRING} (?:%20union%20|%3Cscript|<script|/\*|insert%20|sysobjects|;--|@@|declare%20|drop%20|benchmark%20|sp_|%3b|char\(|'%22) [NC]
RewriteRule !403\.html$ - [F]

I need to update the 403.html file, but I cannot find where it exists on the server.  Do you know where it is or is it part of your DLL?

If it is part of the DLL, how do I update to just send to a file on my server somewhere?  I want to make sure the same URL that was requested is still show in the URL bar.

Thanks for the help!

Dennis

 

Back to Top View dennisg's Profile Search for other posts by dennisg
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10483
Posted: 28 July 2010 at 3:28am | IP Logged Quote Anton

"I need to update the 403.html file, but I cannot find where it exists on the server. Do you know where it is or is it part of your DLL?"
- how do I know where YOUR file lives?

"I want to make sure the same URL that was requested is still show in the URL bar."
- Do you want to change your rule or do you want to change your 403.html to achieve that? Could you please clarify.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
dennisg
Groupie
Groupie


Joined: 14 May 2009
Online Status: Offline
Posts: 66
Posted: 28 July 2010 at 7:19am | IP Logged Quote dennisg

Hi Anton.

I was asking how that rule works I guess.  I did a search of my entire computer for 403.html and did not find anything.  So, I thought that it might be part of the ISAPI DLL or something.  Is this true?  Please explain if you can.

Ultimately, I would like to have everything work as it is, but just change the text in the 403 file.  I just cannot find it anywhere!! 

Thanks,

Dennis

Back to Top View dennisg's Profile Search for other posts by dennisg
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10483
Posted: 28 July 2010 at 8:28am | IP Logged Quote Anton

"So, I thought that it might be part of the ISAPI DLL or something. Is this true?"
- no, it's not a part of ISAPI_Rewrite.dll. This must be a custom 403 page you should have somewhere on your site.
Try to search it in IIS where error pages are defined.

Notice that with the above rule ANY page EXCEPT 403.html with the listed query string values will get redirected to 403 Forbidden page.
So, maybe the 403.html was deleted; this won't affect the functionality.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
dennisg
Groupie
Groupie


Joined: 14 May 2009
Online Status: Offline
Posts: 66
Posted: 28 July 2010 at 9:32am | IP Logged Quote dennisg

Exactly - it goes to Forbidden.  So, i guess that you are saying that 403.html (or the Forbidden page) must exist somewhere on the box?

What exactly does this part of the rule mean?

RewriteRule !403\.html$ - [F]

How does it know where the 403.html page actually is?

This is IIS6, normal setup.

Thank you!

Dennis


Back to Top View dennisg's Profile Search for other posts by dennisg
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10483
Posted: 29 July 2010 at 3:01am | IP Logged Quote Anton

Hi, Dennis.

The rule RewriteRule !403\.html$ - [F] means:
if the requested page is NOT 403.html, go to 403 Forbidden page. So if you don't have such file, the rule will fire any time the cond is matched.
I guess, you may fix you rule as follows and nothing will change:

RewriteCond %{QUERY_STRING} (?:%20union%20|%3Cscript|<script|/\*|insert%20|sysobjects|;--@@|declare%20|drop%20|benchmark%20|sp_|%3b|char\(|'%22) [NC]
RewriteRule .? - [F]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum