UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > Windows Dedicated Server

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-07-2008, 14:24
new member
 
Join Date: Sep 2007
Posts: 6
Default Smart domains in Server 2003

ok first let me explain what exactly I want

I have a dedicated web server , with one web web site hosting hosted on it , I can access web web site hosting with 2 address my main domain and my static IP
but I want if users wanted to access my web web site hosting via IP system automaticaly redirect them to my domain istead of opening web web site hosting by IP, I want this for domain with and without www also . for example I want if users access web site hosting with this address http://mysite.com system redirect them to http://www.mysite.com
you can see this in microsoft domain
look at this

http://www.microsoft.com/windows/products/windowsvista/sp1.mspx

now if we got to this address with microsoft ip system automatically redirect us to main domain and above address

http://207.46.232.182/windows/products/windowsvista/sp1.mspx

I want to know what is IIS Web Server configuration to do this , or may be its a DNS configuration

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-07-2008, 15:39
eUK-Martin's Avatar
Windows System Administrator
 
Join Date: Nov 2005
Location: Earth
Posts: 462
Default

Hello,

There is no IIS Web Server or sever end settings that would do this for you. You can have this by using redirecting rules. To enable this on your server you will need an application such as ISAPI_Rewrite and set a rule to redirect a request on IP to a particular domain.

Also the example that you have given of Microsoft's web site hosting must have also used a redirect rule as if you try to browse a non existing page it will still change the URL to a domain first and then redirect.
__________________
Martin
Windows System Admin.


Windows VPS Hosting - Windows Dedicated Server - Web Hosting Tutorials

Email :: windows @ eUKhost.com AND support @ eUKhost.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-07-2008, 21:14
flesso's Avatar
Premium Member
 
Join Date: Mar 2007
Location: 127.0.0.1
Posts: 1,462
Default

Hi,

If you're using the classic ASP scripting language you can add the following code to the header of each page, or use an include:

PHP Code:

<%

 Function 
TLsplit(StrToSplit,Delim)
Dim StrArray()
If 
StrToSplit "" Then
  ReDim StrArray
(1)
  
StrArray(0) = 0
  StrArray
(1) = ""
  
TLsplit StrArray
Else
  
dcount 0
  
For TLsI 1 To Len(StrToSplit)
   If 
Mid(StrToSplit,TLsI,1) = Delim Then dCount dCount 1
  Next
  
If dCount 0 Then
   ReDim StrArray
(1)
   
StrArray(0) = 1
   StrArray
(1) = StrToSplit
   TLsplit 
StrArray
  
Else
   
ReDim StrArray(dCount 1)
   
StrArray(0) = dCount 1
   TempArray 
Split(StrToSplit,Delim)
   For 
TLsI 1 To dCount 1
    StrArray
(TLsI) = Trim(TempArray(TLsI 1))
TLsplit StrArray
   Next
  End 
If
End If
End Function

Dim MainDomain

MainDomain 
"yourdomain.com" your domain without the www

SplitHeader 
TLSplit(Request.ServerVariables("SERVER_NAME"),",")

If 
Request.ServerVariables("SERVER_NAME") = Request.ServerVariables("LOCAL_ADDR"Then

Response
.Redirect("http://" MainDomain)

ElseIf 
SplitHeader(1) = "www" Them

Response
.Redirect("htp://" MainDomain)

End If

%> 
Something like that should do. TLSplit function courtesy of powerasp.com.
__________________
Regards,
Josh Hold

eUKhost Blog: Over 1000 Computer Related Articles to Sink Your Teeth Into!

LDN GIGS - Gig Listings for London

Super Moderator

I'm only a forum gremlin (moderator), and do not work for eUKhost in any way. Opinions expressed by me are mine only, and do not reflect those of either eUKhost or any company that may be listed above.

I don't bite, honest.

Last edited by flesso; 12-07-2008 at 21:19.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 13-07-2008, 04:12
new member
 
Join Date: Sep 2007
Posts: 6
Default

Thanks a lot
I did what I wanted with ISAPI_Rewrite .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 10:43.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles

Web Hosting
Web Hosting Service