Forum Moderators: open
A client of mine is having an impossible time getting their directory type website spidered so we're going for ISAPI_REWRITE as a matter of urgency.
Points to note:
1. They run their own server IIS5
2. They have other sites on the server
3. Number of search string parameters may vary
Current situation
Typically they have these types of URL:
[example.com...]
(could also be
[example.com...]
Desired outcome
We'd be very happy if these were rewritten as:
[example.com...]
(or
[example.com...]
Here is a draft of my instructions to them. It's based on my understanding of the ISAPI_REWRITE documentation.
The only experience I bring to this is having once done a mod_rewrite in Apache. I have little more than a passing knowledge of Regular Expressions (although I am willing to learn!).
I'd be very grateful if someone could review and let me know if this will work:
1. Duplicate database and website to create a test environment (clever, this one!)
2. Install full version of ISAPI - using the automatic installer
3. Modify permissions for the System Account
ISAPI .dll's - read access
Global httpd.ini file (which will be located in the installation directory) - read access
Any directory to have an httpd.ini file (such as the root directory for the website in question) should have the permission set to modify for the system account.
4. Configuration
a) Global configuration file httpd.ini
Do I have to touch this at all? My instinct would have me leave this as a blank file for the moment, but perhaps while here they should have a minimum of:
[ISAPI_Rewrite]
# Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule /httpd(?:\.ini¦\.parse\.errors) / [F,I,O]
# Block external access to the Helper ISAPI Extension
RewriteRule .*\.isrwhlp / [F,I,O]
Anything to add?
b) Site configuration:
Save an httpd.ini file in the site root with the following:
[ISAPI_Rewrite]
RewriteRule (.*?\.asp)(\?[^/]*)?/([^/]*)/([^/]*)(.*) $1(?2$2&:\?)$3=$4$5 [NS,I]
----
Will that do it?
Is any more needed?
It would be wonderful to think it's this easy.
[edited by: Xoc at 7:03 am (utc) on April 26, 2005]
[edit reason] Use example.com for examples [/edit]
Yes ... it is that simple. I use ISAPI rewrite for some time now ... like a year ... the LITE version works for me just fine and it enabled the search spiders to go into my dynamic generated pages for indexing since they are repelled by? sign.
I use this ISAPI also to emulate virtual folders for redirects. Like /login or /forum, where actual applications run elsewhere.
Cheers
Uwebe