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: Rewrite rule conditional
Author
Message |
acidutzu
Newbie


Joined: 05 October 2005
Location: Italy
Posts: 10
Posted: 18 November 2011 at 10:56am

Hello i use ISAPI REWRITE 2 full version and have this httpd.ini file now :

Code:

[ISAPI_Rewrite]
RewriteCond %HTTPS off
RewriteCond Host: (?!^www.poshsunglasses.net)(.+)
RewriteRule /(.*) http\://www.poshsunglasses.net/$2 [I,RP]
RewriteRule /httpd(?:\.ini|\.parse\.errors).* / [F,I,O]
RewriteRule .*\.isrwhlp / [F,I,O]
RewriteRule ^([^-]*)-([^-]*)-([^-]*)\.html$

/detail.asp?id=$1&b=$2&m=$3 [L]

RewriteRule (.+)-([^-]*)-([^-]*)-([^-]*)\.asp$

/brands3.asp?brand=$1&keyword=$2 [L]
RewriteCond Host: www\.poshsunglasses\.net
RewriteRule /([^?.]+) http\://www.poshsunglasses.net/ [I,RP]



i'm reffering at this rule
Code:

RewriteRule (.+)-([^-]*)-([^-]*)-([^-]*)\.asp$

/brands3.asp?brand=$1&keyword=$2 [L]


I try to add a multilanguage based on 1 file brands3.asp.

Problem:
if i use www.domain.com/xx this rule works great:
Code:

RewriteRule (.+)-([^-]*)-([^-]*)-([^-]*)\.asp$

/brands3.asp?brand=$1&keyword=$2 [L]


if i use www.domain.com i want this rule to work:
Code:

RewriteRule (.+)-([^-]*)\.asp$

/brands3.asp?brand=$1&keyword=$2 [L]


Any suggestions?
Thank you
Back to Top Visit acidutzu's Homepage
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 21 November 2011 at 3:24am

I'm sorry, but I don't quite understand how this

www.domain.com/xx will ever match RewriteRule (.+)-([^-]*)-([^-]*)-([^-]*)\.asp$ /brands3.asp?brand=$1&keyword=$2 [L]
and
www.domain.com will match RewriteRule (.+)-([^-]*)\.asp$ /brands3.asp?brand=$1&keyword=$2 [L]

Please explain...

__________________
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