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: Substring Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
dickbob
Newbie
Newbie


Joined: 30 August 2007
Online Status: Offline
Posts: 30
Posted: 20 September 2008 at 6:51am | IP Logged Quote dickbob

Hi,

I'm trying to redirect...

foo.com/index.html?issue=200402

...to...

foo.com/index.html?year=2004&month=02

...how can i string chop?
Back to Top View dickbob's Profile Search for other posts by dickbob
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Online
Posts: 4839
Posted: 23 September 2008 at 1:39am | IP Logged Quote Anton

Please try this rule:

RewriteBase /
RewriteCond %{QUERY_STRING} ^issue=(\d{4})(\d{2})$ [NC]
RewriteRule ^index\.html$ index.html?year=%1&month=%2? [NC,R=301,L]

__________________
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