|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Hello.
This is a little bit of a long shot but I thought I would ask anyway. I hope someone has an idea for me. I have an application running on a web server. This application is accessed via a URL and uses querystrings. There are certain parts of the querystring that indicate which part of the application is to be accessed. Such as, if Admin is contained within the querystring the application will respond with a logon page as this is a request to perform one of the admin functions within the application. I'm trying to find out if it is possible to process a script on the server for each and every URL that is requested. I would then use this script to check the URL for a text string. If a specific text string is returned I would then redirect the page request to another page with a message or function. I'm pretty sure I will be able to work out the redirection and the text string query, but does anyone know how to provoke a script to run for each URL request? Any comments would be appreciated. Thank you.
__________________
- Post your code - Post your errors - Be clear - Be courteous PLEASE...Finalise your thread with a solution or confirmation that the last advice worked or failed (We are here to help each other).
|
|
#2
|
||||
|
||||
|
I'm not sure I quite get your drift, but have a look at Server.Execute:
http://www.w3schools.com/asp/met_execute.asp
__________________
selwonk If I've posted some code above, you might think it looks a bit simplistic. It might be. I'd rather people tried the next step themselves rather than getting a full solution on a plate. That way they learn more! |
|
#3
|
||||
|
||||
|
Thanks for the reply Mike.
What I'm trying to do is get iis to run a script as soon as a request is made for any URL. This script will then govern what happens next. The script will either say yes continue or no look at a different page dependant upon the contents of the querystring. |
|
#4
|
||||
|
||||
|
Ah - sorry. A mod rewrite sort of thing. A bit out of my experience I am afraid. Try Lafin Boy - I think he's created mod rewrites before...
|
|
#5
|
||||
|
||||
|
You can try having a go with an IIS Mod Rewrite package, if you have access to the server to instal com/dll packages. A simple (free) rewrite package can be found here
If that's not what you're after then maybe have an include file that handles all of the case statements and redirects accordingly. This include can then be included as the first block of script on each page.
__________________
-
thought-after | my thoughts on web development Get Firefox, the developers browser Budget hosting - recommended [/left] |
![]() |
| Viewing: ASP Free Forums > System Administration > Microsoft IIS > URL Checker? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|