This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x (Forum Locked Forum Locked)
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: help with ISAPI REWRITE
Author
Message |
arof3000
Newbie


Joined: 14 June 2010
Posts: 2
Posted: 19 October 2010 at 5:04pm

my friends, please, help me:

I need support for configuring a httpd.ini with the
ISAPI_REWRITE tool.

I have a domain (mysite.com) that need redirect according
the following rules:

user enters: aconcagua.mysite.com/x.aspx
URL must be rewrited to: aconcagua.mysite.com/x.aspx?
account=aconcagua

user enters: aconcagua.mysite.com/x.aspx?name=xyz
URL must be rewrited to: aconcagua.mysite.com/x.aspx?
name=xyz&account=aconcagua

user enters: aconcagua.mysite.com/
URL must be rewrited to: aconcagua.mysite.com/?
account=aconcagua&name=xyz

user enters: aconcagua.mysite.com
URL must be rewrited to: aconcagua.mysite.com/?
account=aconcagua

user enters: www.mysite.com
URL must be rewrited to: www.mysite.com/?
account=aconcagua

the domains name must always becomes a query string,
except for www case. But I also need to maintain other
query strings.


my files is like bellow, but doesn't works:
-------------------------------
[ISAPI_Rewrite]
RewriteCond Host: (?!www\.)([^.]+)\.mysite\.com
RewriteRule (\?.*)? $2(?3$3&:\?)account=$1 [I,L]

-------------------------------

anybody could help me with a gently help? thanks a lot
Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 20 October 2010 at 4:11am

Please try to have the following:

[ISAPI_Rewrite]
RewriteCond Host: (?!www\.)([^.]+)\.mysite\.com
RewriteRule /? /\?account=$1 [I,L]

RewriteCond Host: (?!www\.)([^.]+)\.mysite\.com
RewriteRule ([^?]+)(\?.*)? $2(?3$3&:\?)account=$1 [I,L]

RewriteCond Host: www\.mysite\.com
RewriteRule .* /\?account=aconcagua [I,L]

__________________
Regards,
Anton
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum