How to do Pan-Domain Name? how to write ini?

Topics: Developer Forum, Project Management Forum, User Forum
Jan 6, 2010 at 10:39 AM

How to do Pan-Domain Name? how to write ini?

Below:

shop100000.test.com

shop100001.test.com

shop100002.test.com

.......................................

how to write ini?

other

shop100000.test.com/list.htm

shop100001.test.com/list.htm

shop100002.test.com/list.htm

.......................................

how to write ini?

 

RewriteCond %{HTTP_HOST} ^(?!www)(shop(.*)+)\.test\.com [I]
RewriteRule ^/shop(.*)$      /test.aspx?uid=*1

this is error

thanks

 

Jan 6, 2010 at 12:17 PM

*.test.com  --> www.test.com/test.aspx?id=*

*.test.com/list.htm -->www.test.com/html/*/list.htm

 

how to write ini?

 

thanks

 

Coordinator
Jan 7, 2010 at 2:10 AM

I don't understand what you want.

If you want help, you need to provide some additional clarification.

I suggest you use the kind of language that I use in the help file.  Use words like:  REDIRECT, REWRITE, URL PATH, HOSTNAME, etc. 

example: "I want to {REDIRECT, REWRITE, PROXY, etc} to xxx when the {URL PATH, HOSTNAME, etc}  is  YYY. "

 

Jan 7, 2010 at 2:20 AM

thanks reply

*.test.com   to   www.test.com/a.aspx?id=*

 

*.test.com/list.htm -->www.test.com/html/*/list.htm

 

understand?

Coordinator
Jan 7, 2010 at 3:26 AM

Well, I'm going to guess.  I think you want a REWRITE, and not a REDIRECT.  Even though you are including www.test.com in the output (to the right of the -->) , I think you want REWRITE because you want the *.test.com to remain in the browser's URL address  bar. 

 So I'm going to guess that you want a rewrite.   Also, you want to rewrite to a URL that is based on the incoming host name. 

There is a section in the help file that covers exactly this.   http://cheeso.members.winisp.net/Iirf20Help/html/63be1460-dbd0-4ad4-ad39-4b68352fe9a6.htm#Section2

Here are the relevant ini directives:

# --------------------------------------------
# explicitly specify the use of * for RewriteCond back-references
CondSubstringBackrefFlag *

# --------------------------------------------
# Rules
# With a request like http://host1.domain.com/Alpha.htm, rewrite the request
# to /host1/Alpha.htm.  If the server is not configured with a 
# vdir named "host1", then IIS will return a 404 "Not Found".

RewriteCond  %{HTTP_HOST}    ^([^\.]+)\.test\.com$
RewriteRule  ^/list.htm$      /html/*1/list.htm  [L]  
Jan 7, 2010 at 4:24 AM

*.test.com   to   www.test.com/a.aspx?id=*      and    *.test.com/list.htm -->www.test.com/html/*/list.htm

how to do?

 

Coordinator
Jan 7, 2010 at 5:17 AM

I just answered this question.

If my answer wasn't clear, I suggest that you read the documentation.

This has been a lot of fun, this game where I guess what you want, and then you ask the same question again.  But I don't want to play anymore.

Good luck.