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: 301 redirects, dynamic to Static Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
samtex9
Newbie
Newbie


Joined: 11 June 2008
Online Status: Offline
Posts: 9
Posted: 25 June 2008 at 6:04am | IP Logged Quote samtex9

At the moment we are having problems creating 301 redirects for dynamic to static urls.

 /b.asp?c=f should redirect to /a.asp with the below rewrite rule but it is not working.

the rewrite rule : RewriteRule b\.asp?c=f a.asp [R=301,L] is not working

Please can you help us with this asap.

Thank you for your help in advance



Edited by samtex9 - 25 June 2008 at 6:04am
Back to Top View samtex9's Profile Search for other posts by samtex9
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 4146
Posted: 25 June 2008 at 7:14am | IP Logged Quote Anton

Please try this:

RewriteBase /
RewriteCond %{QUERY_STRING} ^c=f$ [NC]
RewriteRule ^b\.asp$ a.asp [NC,R=301,L]

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


Joined: 11 June 2008
Online Status: Offline
Posts: 9
Posted: 25 June 2008 at 7:45am | IP Logged Quote samtex9

"b.asp?c=f” is being redirected to “a.asp?c=f”. We would like it to redirect only to “a.asp”. We do not want query string in redirected URL.

Many thanks  



Edited by samtex9 - 25 June 2008 at 7:48am
Back to Top View samtex9's Profile Search for other posts by samtex9
 
Yaroslav
Moderator Group
Moderator Group


Joined: 15 August 2002
Online Status: Offline
Posts: 6455
Posted: 25 June 2008 at 9:04am | IP Logged Quote Yaroslav

RewriteBase /
RewriteCond %{QUERY_STRING} ^c=f$ [NC]
RewriteRule ^b\.asp$ a.asp? [NC,R=301,L]

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


Joined: 11 June 2008
Online Status: Offline
Posts: 9
Posted: 25 June 2008 at 9:41am | IP Logged Quote samtex9

Yaroslav wrote:
RewriteBase /
RewriteCond %{QUERY_STRING} ^c=f$ [NC]
RewriteRule ^b\.asp$ a.asp? [NC,R=301,L]

Thank you very much, we know have it working well.

:)

Back to Top View samtex9's Profile Search for other posts by samtex9
 

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