Hello is there any way of giving a virtual directory an alias so that it keeps its original name on my intranet but when viewed externally it is something else i.e on intranet called "public_folder" and on internet "intranet"
Hope that makes sense

Dani AI

Generated

Short answer: yes. described wanting the same files reachable as public_folder on the intranet but as intranet from outside. ’s idea of using separate site/alias entries is the most robust approach because it keeps the URL space under your control and avoids on‑the‑fly renames.

For a concrete implementation: create two IIS sites (or two site bindings) that both point at the same physical folder. On the internal-bound site create the virtual directory or site root you want exposed as public_folder; on the external-bound site create the alias intranet (or make it the site root). In IIS6 set the Host Header when creating the site; in IIS7+ add host names in Site Bindings. Use split DNS internally and public DNS/NAT externally so each host name resolves to the correct IP.

Alternatives and HTTPS notes: two virtual directories with different aliases under one site will also work but both names will be reachable from the same hostname (not ideal if the goal is to expose one name only externally). To rewrite or hide a path externally consider a reverse proxy or the URL Rewrite module (map external /intranet to internal /public_folder). For HTTPS either use a certificate that covers both names (SAN/wildcard), SNI on IIS8+ or separate IPs for each cert.

Quick checklist: verify NTFS permissions for the app‑pool identity, confirm DNS resolution with nslookup or hosts file, check bindings with netstat, review IIS logs to confirm which site served requests, and confirm firewall/NAT rules allow the external name through. Changes should be tested in a lab before production. Credit to for the site/alias starting point.

Recommended Answers

All 2 Replies

Hello,

A very interesting question. I am thinking this can be done with IIS 6. What you would do is create two websites pointing to the same direction... one with one name, and the other with the other name, and have them pointing to the same directory of files.

If that fails, you could have a folder alias pointing to the orig file location, and make one website go to the real files, and the other website go to the alias, which will go to the files.

This is just theory; I have not tried it.


Christian

Excellent, thanks Christian, both sound like they should work will try them and post results here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.