Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: Complex Rule, To find a solution, Please Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
so2omax
Newbie
Newbie


Joined: 29 September 2008
Online Status: Offline
Posts: 4
Posted: 08 October 2008 at 10:59pm | IP Logged Quote so2omax

Question one :

RewriteCond %{HTTP_HOST} ^(.+)\.abc\.com$
RewriteRule .? /test.php?id=%1 [NC,L]

To achieve the above rules, such as :
 
 
Rewrite URL: http://123.abc.com/
 
If RewriteCond match to the www or the resolution does not specify how the characters do?
 
Question two :
 
But if I want to pass parameters to achieve more than what to do ?
 
such as :
 
Real URL: http://abc.com/product.php?id=123&page=20&mask=3
 
Rewrite URL: http://123.abc.com/product-20-3.html
Back to Top View so2omax's Profile Search for other posts by so2omax
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 09 October 2008 at 5:23am | IP Logged Quote Vyacheslav

Hi,
Please try this:
Code:
RewriteCond %{HTTP_HOST} ^(?!www)(.+)\.abc\.com$
RewriteRule (?!product).* /test.php?id=%1 [NC,L]

RewriteCond %{HTTP_HOST} ^(?!www)(.+)\.abc\.com$
RewriteRule ^/product-(\d+)-(\d+)\.html$ /test.php?id=%1&page=$1&mask=$2 [NC,L]


__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
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 can vote in polls in this forum