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 for specific querystring
Author
Message |
intechnia
Newbie


Joined: 03 June 2011
Posts: 1
Posted: 03 June 2011 at 12:36pm

Hi

I'm a newbie at this and have been trying to write a redirect rule which allied to only one page and for one specific querystring as follows:

redirect from
http://www.mydomain.com/mypage?id=1234
to
http://www.mydomain.com/myNEWpage?id=1234

I only want the redirect for id=1234, not for other ids.

Please can someone help.

many thanks
Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 03 June 2011 at 1:40pm

RewriteRule /mypage\?id=1234 http\://www.mydomain.com/myNEWpage\?id=1234 [I,R]
Back to Top
 
hoppus
Newbie


Joined: 12 October 2011
Posts: 1
Posted: 12 October 2011 at 4:42am

I want to do something like this..

i have now

Code:
RewriteCond %{QUERY_STRING} ^inc=32&menu=117$ RewriteRule ^index\.php$ http://www.example.com/index_re.php?inc=32&menu=117 [L,NC,QSA]


it now works like when i open http://www.example.com/index.php?inc=32&menu=117 its redirects to http://www.example.com/index_re.php?inc=32&menu=117

what should i do, i want it not to change address, but to still show http://www.example.com/index.php?inc=32&menu=117 but actually execute http://www.example.com/index_re.php?inc=32&menu=117 ?
Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 12 October 2011 at 10:17am

Are you sure that you are using ISAPI_Rewrite 2? Your rule looks like v3 rule.

Here is the v2 rule:

RewriteRule /index\.php\?inc=32&menu=117 /index_re.php\?inc=32&menu=117 [I,L]
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