Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x support forum
 Helicon Tech : ISAPI_Rewrite 2.x support forum
Subject Topic: rewrite rule - need help! Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jonnyross99
Newbie
Newbie


Joined: 11 May 2007
Online Status: Offline
Posts: 27
Posted: 10 May 2008 at 2:26am | IP Logged Quote jonnyross99

hi

i have been going round in circles and just wondered if anyone can help me write a couple of rules for the following...

number 1

http://www.mysite.com/f1/variable1-variable2.asp

resolve to

http://www.mysite.com/f1/page.asp?name=variable1&page=variable2

 

number 2

http://www.mysite.com/f1/variable1-variable2-variable3.asp

resolve to

http://www.mysite.com/f1/page.asp?name=variable1&id=variable2&page=variable3

 

Also will i be able to use both at the same time?

many thanks in advance!

jonny

Back to Top View jonnyross99's Profile Search for other posts by jonnyross99
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6455
Posted: 12 May 2008 at 8:43am | IP Logged Quote Yaroslav

RewriteRule /f1/([^-]+)-([^-]+)-([^-]+)\.asp /f1/page.asp?name=$1&id=$2&page=$3
RewriteRule /f1/([^-]+)-([^-]+)\.asp /f1/page.asp?name=$1&page=$2

__________________
Yaroslav Govorunov,
Helicon Tech
Back to Top View Yaroslav's Profile Search for other posts by Yaroslav Visit Yaroslav's Homepage
 
jonnyross99
Newbie
Newbie


Joined: 11 May 2007
Online Status: Offline
Posts: 27
Posted: 20 May 2008 at 5:43am | IP Logged Quote jonnyross99

hi

 

this is great thanks! is there any chance you could give me one for the following:-

 

http://www.sunglassesuk.com/f1/variable1/variable2-variable3-variable4.asp 

 

to resolve to

 

http://www.mysite.com/f1/page.asp?forumname=variable1&postname=variable2&posted=variable3&page=variable4

 

thanks!

Back to Top View jonnyross99's Profile Search for other posts by jonnyross99
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7468
Posted: 23 May 2008 at 9:09am | IP Logged Quote Lexey

RewriteRule /f1/([^/?]+)/([^-/?]+)-([^-/?]+)-([^/?]+)\.asp /f1/page.asp\?forumname=$1&postname=$2&posted=$3&page=$4 [I,L]
Back to Top View Lexey's Profile Search for other posts by Lexey
 
jonnyross99
Newbie
Newbie


Joined: 11 May 2007
Online Status: Offline
Posts: 27
Posted: 22 July 2008 at 10:23am | IP Logged Quote jonnyross99

hi,

i have had to make some changes.... are you able to help me with these?

1>

http://www.mysite.com/f1/variable1-variable2-variable3.asp

which would resolve to:

http://www.mysite.com/f1/forum.asp?forumGroup=variable1&forumname=variable2&page=variable3


2>

http://www.mysite.com/f1/variable1/variable2/variable2-variable3-variable4.asp 

to resolve to

http://www.mysite.com/f1/forum_viewpost.asp?forumGroup=variable1&forumname=variable2&postname=variable3&postid=variable4&page=variable


many thanks in advance.
JOnny
Back to Top View jonnyross99's Profile Search for other posts by jonnyross99
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7468
Posted: 28 July 2008 at 4:43pm | IP Logged Quote Lexey

#1
RewriteRule /f1/([^-/?]+)-([^-/?]+)-([^/?]+)\.asp /f1/forum.asp\?forumGroup=$1&forumname=$2&page=$3 [I,L]

#2
RewriteRule /f1/([^/?]+)/([^/?]+)/([^-/?]+)-([^-/?]+)-([^/?]+)\.asp /f1/forum_viewpost.asp\?forumGroup=$1&forumname=$2&postname=$3&postid=$4&page=$5 [I,L]
Back to Top View Lexey's Profile Search for other posts by Lexey
 

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 cannot vote in polls in this forum