apparition
Technical User
I have Apache 2.0 installed on a WinNT4 box coexisting with IIS which I moved to port 81. Apache handles everything except for the ASPs. I used mod_rewrite to change and urls that contain "asp" to port 81 like this:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)asp(.*)$ [NC]
RewriteRule ^.*$
Some of my directories contain only asp applications so I also added index.asp and default.asp to the DirectoryIndex directive for the site so that people don't get broken links.
The problem is that while the rewrite works for urls with the full file name, if someone goes to a directory and does not specify the file name (i.e. default.asp), the url is not rewritten to port 81 because there is no file name containing "asp" and apache tries to parse the vbscript! I could put a redirect page in there but that is sloppy.
Is there a way to get the file name even if the user requests just the directory? I tried to use the REQUEST_FILENAME variable but it looks like the actual file name is not there either.
Any ideas?
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)asp(.*)$ [NC]
RewriteRule ^.*$
Some of my directories contain only asp applications so I also added index.asp and default.asp to the DirectoryIndex directive for the site so that people don't get broken links.
The problem is that while the rewrite works for urls with the full file name, if someone goes to a directory and does not specify the file name (i.e. default.asp), the url is not rewritten to port 81 because there is no file name containing "asp" and apache tries to parse the vbscript! I could put a redirect page in there but that is sloppy.
Is there a way to get the file name even if the user requests just the directory? I tried to use the REQUEST_FILENAME variable but it looks like the actual file name is not there either.
Any ideas?