For example, say you want to create a word in your network, when typed into a browser it would then redirect to a another URL or site not on the default port 80.
For me I am redirecting spiceworks to my Spiceworks portal, which happens to be at spiceworks.domain.com:9675/portal
So when I type in spiceworks, it redirects to http://spiceworks.domain.com:9675/portal
I am going to break this down into 2 main steps. DNS and Web Server with URL Rewrite.
Step A1: On your DNS Server (Internal or External if using another domain name) add a new host and point it to your Web server.
Step B1:
Install URL Rewrite into your IIS environment. Easy, just go to this website on your web server and click install this extension.
http://www.iis.net/downloads/microsoft/url-rewrite
Step B2: Close and re-open IIS, you should now see the URL Rewrite extension under the IIS section.
Step B3:
Open URL Rewrite, and on the right hand column select ‘Add Rule(s)’
Step B4: Select ‘Blank rule’
Step B5:
Match URL
– Name: Enter a name
– Using: Regular Expressions
– Pattern: (.*)
Conditions Add
– Input: {HTTP_HOST}
– Type: Matches the Pattern
– Pattern: ^spiceworks$ (ignore case)
Action
– Action Type: Redirect
– Redirect URL: http://spiceworks.domain.com:9675/portal
Click Apply on the Right Hand Column
If you want to just import a script here’s the script:
Copy and Paste:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^spiceworks$
RewriteRule (.*) http://spiceworks.domain.com:9675/portal/$1
Then save the file as someName.htaccess and use the Import function inside the URL Rewrite extension.
More information on URL Rewrite Rules.
http://www.iis.net/learn/extensions/url-rewrite-module/url-rewrite-module-configuration-reference
http://ruslany.net/2009/04/10-url-rewriting-tips-and-tricks/