Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Some Questions on how URL Rewriting 2.0 works

$
0
0

Long story short: I have 1 IIS site that has multiple subdomains bound to it.  Currently, my rewriting looks at the subdomain and rewrites the request accordingly: (www as the default)

hostname.com/image.gif >> [rewritten to] >> /www/image.gif
projects.hostname.com/image.gif >> [rewritten to] >> /projects/image.gif

This is fine and all, but I'm noticing an oddity when it comes to directories (which I currently have directory browsing disabled site-wide)  I have a folder under the root's 'www' folder called 'test'.  So I should be able to get to it by calling 'hostname.com/test' (because it's rewritten to /www/test' but here's what happens:

hostname.com/test >> [REDIRECTS to] hostname.com/www/test (which is run through my rewrite rules and is looking for /www/www/test, which does not exist, throwing the appropriate error.  However if I put a '/' on the end of the request like:

hostname./com/test/ >> [rewrites to] >> /www/test/  (as expected)

So I guess my question here is "what is going on with the first request, where leaving off the '/' makes IIS not see the subdirectory and perform some kind of automatic redirect to 'hostname.com/www/test/' 


Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>