Subdomain redirect to folder

Topics: User Forum
Feb 17, 2010 at 4:17 PM

I need to do a subdomain redirect to a folder like this:<!--amespace prefix = o ns = "urn:schemas-microsoft-com:office:office"-->

 http://subdomain.domain.com to http://www.domain.com/subdomain/

 my server administrator installed the ISAPI_rewrite into my server and i think that it works good because with other rules it works.

In my web hosting i have a “rewrite” folder with 2 files (isapirewrite4.ini and isapirewrite4.dll). I tried with a simple rule in isapirewrite4.ini and it works good but with a advanced rule to do a subdomain redirect it not works.

 Please help me.  

Coordinator
Feb 17, 2010 at 8:28 PM
Edited Feb 17, 2010 at 8:29 PM

#1 - I recommend that you move to IIRF v2. It's been final/stable for a long while now.  Since August last year.

#2. - your scenario is in the documentation.  For Rewrite:  http://cheeso.members.winisp.net/Iirf20Help/html/63be1460-dbd0-4ad4-ad39-4b68352fe9a6.htm#Section2  For Redirect: http://cheeso.members.winisp.net/Iirf20Help/html/63be1460-dbd0-4ad4-ad39-4b68352fe9a6.htm#Section7

 

Good luck

 

Feb 19, 2010 at 9:48 AM

Ok,

i've IIRF right now with this rules:

#RewriteCond  %{HTTP_HOST}  ^(.*)\.domain\.com$
#RedirectRule ^/(.*)$       http://domain/*1/$1         [R=301]

when i go to http://www.mydomain.com i redirect to http://mydomain/www 

when i go to http://test.mydomain.com i have an error.

It's necessary to include a DNS zone into my domain configuration?

Thanks! 

Coordinator
Feb 19, 2010 at 12:31 PM

You reported that you have an error, but you didn't describe the error.

What does the IIRF log say?  the IIS log?

 

Feb 19, 2010 at 1:28 PM

I don't have access to IIS logs or IIRF logs. My server is administrated by the data center provider. When i go to test.mydomain.com the error is:

Bad Request (Invalid Hostname)

Coordinator
Feb 19, 2010 at 1:44 PM

Well that sure sounds like it's a DNS problem, not a problem with IIRF.

Good luck!