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: Regular Expression help Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
msprasad
Newbie
Newbie


Joined: 24 September 2008
Location: India
Online Status: Offline
Posts: 9
Posted: 24 September 2008 at 3:38am | IP Logged Quote msprasad

Hi All,

Below is the my original url

http://mydomain.com/mypage.asp?x=0&y=6&z=3&hours=24&mt=2&ft=8

I need to change the url format as below

http://mydomail.com/all-areas/all-cuisines/0,6,3,24-2-8/mypage

The x, y, z are seperated by "," and hours, mt, ft are seperated by"-"

can anybody please help in writing the regular expression  rewrite rule for the above?

Thanks in advance.

 



__________________
Shiva
Back to Top View msprasad's Profile Search for other posts by msprasad
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 24 September 2008 at 5:47pm | IP Logged Quote Vyacheslav

Hi.
Please try this:
Code:
RewriteRule ^/all-areas/all-cuisines/(\d+),(\d+),(\d+),(\d+)-(\d+)-(\d+)/([^/]+)/?$ $7.asp?x=$1&y=$2&z=$3&hours=$4&mt=$5&ft=$6 [NC,L]


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


Joined: 24 September 2008
Location: India
Online Status: Offline
Posts: 9
Posted: 25 September 2008 at 7:21am | IP Logged Quote msprasad

Hi Vyacheslav Shinkarenko,

Thanks a lot, and it worked fine.

I need one more help to accept a url like

http://mydomain.com/mypage.asp?x=0&y=6&z=3&hours=24&mt=2&ft=8&search=w&sort=2

I need to change the url format as below

//0,6,3,24-2-8/mypage">http://mydomail.com/<all chars>/<all chars>/0,6,3,24-2-8/mypage?search=w&sort=2

The <all chars> should accept all alpha numeric and special chars.

Please help. Once again thanks for your help.

 

 

 



__________________
Shiva
Back to Top View msprasad's Profile Search for other posts by msprasad
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 25 September 2008 at 7:41am | IP Logged Quote Anton

Please try the following:

RewriteRule ^/[^/]+/[^/]+/(\d+),(\d+),(\d+),(\d+)-(\d+)-(\d+)/([^/]+)/?$ $7.asp?x=$1&y=$2&z=$3&hours=$4&mt=$5&ft=$6 [NC,L]



__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
msprasad
Newbie
Newbie


Joined: 24 September 2008
Location: India
Online Status: Offline
Posts: 9
Posted: 25 September 2008 at 8:55am | IP Logged Quote msprasad

Hi Vyacheslav Shinkarenko,

Thanks for very quick reply.

I could not able to access the ?search=w&sort=2 after the mypage .

Please help.

Thanks

Shiva

 



__________________
Shiva
Back to Top View msprasad's Profile Search for other posts by msprasad
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 26 September 2008 at 2:37am | IP Logged Quote Anton

Please fix your rule like this:

RewriteRule ^/[^/]+/[^/]+/(\d+),(\d+),(\d+),(\d+)-(\d+)-(\d+)/([^/]+)/?$ $7.asp?x=$1&y=$2&z=$3&hours=$4&mt=$5&ft=$6 [NC,QSA,L]



__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
msprasad
Newbie
Newbie


Joined: 24 September 2008
Location: India
Online Status: Offline
Posts: 9
Posted: 30 September 2008 at 6:13am | IP Logged Quote msprasad

Hi Vyacheslav Shinkarenko,

Will try, and let you know the status.

Thanks a lot for your help.

 

Thanks

Shiva

 

 



__________________
Shiva
Back to Top View msprasad's Profile Search for other posts by msprasad
 
msprasad
Newbie
Newbie


Joined: 24 September 2008
Location: India
Online Status: Offline
Posts: 9
Posted: 03 October 2008 at 2:51am | IP Logged Quote msprasad

Hi Vyacheslav Shinkarenko,

The rewrite rule works fine.

Thanks a lot.

Shiva

 

 

 



__________________
Shiva
Back to Top View msprasad's Profile Search for other posts by msprasad
 
msprasad
Newbie
Newbie


Joined: 24 September 2008
Location: India
Online Status: Offline
Posts: 9
Posted: 03 October 2008 at 9:19am | IP Logged Quote msprasad

Hi Vyacheslav Shinkarenko,

Can you do one more help?

Out SEO guys are changing the url format from

http://mydomain.com/mypage.asp?x=0&y=6&z=3&hours=24&mt=2&ft=8&search=w&sort=2

to

//000006003024002008/mypage" _blank?>http://mydomail.com/<all chars>/<all chars>/000006003024002008/mypage?search=w&sort=2

in the bold test the first three degits(000) represents 'x', next three degits(006) represents 'y', next three degits(003) represents 'z', next three degits(024) represents 'hours', next three degits(002) represents 'mt' and the last three degits (008)  represents 'ft'.

Please help me in writing the rule for the above.

Thanks in advance.

Shiva

 

 

chars>/0,6,3,24-2-8/mypage?search=w&sort=2

The <all chars> should accept all alpha numeric and special chars.



__________________
Shiva
Back to Top View msprasad's Profile Search for other posts by msprasad
 
msprasad
Newbie
Newbie


Joined: 24 September 2008
Location: India
Online Status: Offline
Posts: 9
Posted: 06 October 2008 at 12:03am | IP Logged Quote msprasad

Hi Vyacheslav Shinkarenko,

Can you do one more help?

Our SEO guys are changing the url format from

http://mydomain.com/mypage.asp?x=0&y=6&z=3&hours=24&mt=2&ft=8&search=w&sort=2

to

//000006003024002008/mypage" _blank?>http://mydomail.com/<all chars>/<all chars>/000006003024002008/mypage?search=w&sort=2

in the bold test the first three degits(000) represents 'x', next three degits(006) represents 'y', next three degits(003) represents 'z', next three degits(024) represents 'hours', next three degits(002) represents 'mt' and the last three degits (008)  represents 'ft'.

Please help me in writing the rule for the above.

Thanks in advance.

Shiva



__________________
Shiva
Back to Top View msprasad's Profile Search for other posts by msprasad
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 06 October 2008 at 4:11am | IP Logged Quote Anton

Please try the following rules:

RewriteBase /
RewriteRule [^/]+/[^/]+/(\d{3})(\d{3})(\d{3})(\d{3})(\d{3})(\d{3})/mypage$ mypage.asp?x=$1&y=$2&z=$3&hours=$4&mt=$5&ft=$6 [NC,QSA,L]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
msprasad
Newbie
Newbie


Joined: 24 September 2008
Location: India
Online Status: Offline
Posts: 9
Posted: 07 October 2008 at 8:43am | IP Logged Quote msprasad

Hi Vyacheslav Shinkarenko,

Thanks a lot, it worked.

Shiva

 

 

 



__________________
Shiva
Back to Top View msprasad's Profile Search for other posts by msprasad
 
cfcunha
Newbie
Newbie


Joined: 07 October 2008
Location: Brazil
Online Status: Offline
Posts: 5
Posted: 07 October 2008 at 3:57pm | IP Logged Quote cfcunha

I am with problem to open pag  .asp using ISAPI REWRITE3

could help me

 

 

Back to Top View cfcunha's Profile Search for other posts by cfcunha
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 08 October 2008 at 2:57am | IP Logged Quote Anton

To cfcunha: Could you please provide some more explicit explanation of your problem.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
msprasad
Newbie
Newbie


Joined: 24 September 2008
Location: India
Online Status: Offline
Posts: 9
Posted: 08 October 2008 at 5:25am | IP Logged Quote msprasad

Hi Vyacheslav Shinkarenko,

The Regular expression sent by you works fine, but i have one more problem here

//000006003024002008/mypage" _blank?>http://mydomail.com/<all chars>/<all chars>/000006003024002008/mypage?search=w&sort=2

The problem is the hilighted value is 024 then the url will be

http://mydomain.com/mypage.asp?x=0&y=6&z=3&hours=24&mt=2&ft=8&search=w&sort=2

if it is 001 then the url will be

http://mydomain.com/mypage.asp?x=0&y=6&z=3&delivery=1&mt=2&ft=8&search=w&sort=2

Please help me in writing the rule for the above.

Thanks in advance.

Shiva



__________________
Shiva
Back to Top View msprasad's Profile Search for other posts by msprasad
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4837
Posted: 09 October 2008 at 5:04am | IP Logged Quote Anton

Sorry, but I couldn't find any obvious solution for that problem. Such specific behavior is hardly possible to be realized in ISAPI_Rewrite.

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

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