Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions
 Helicon Tech : Common Questions
Subject Topic: Redirect url with query str to other site Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
dtnsemprog
Newbie
Newbie


Joined: 10 March 2010
Location: United States
Online Status: Offline
Posts: 19
Posted: 23 August 2010 at 3:12pm | IP Logged Quote dtnsemprog

I asked before how to redirect just one page to another domain and this has been working for me:

RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.site1\.com$ [NC]
RewriteRule ^afolder/onlythispage\.html$ http://www.adifferentsite.com/index.html [NC,R=301,L]

What would the redirect look like if the url has a query string?

EX:
Redirect www.site1.com/folder/page.cfm?onlythisID=8
To http://www.adifferentsite.com/folder/

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


Joined: 10 March 2010
Location: United States
Online Status: Offline
Posts: 19
Posted: 23 August 2010 at 3:30pm | IP Logged Quote dtnsemprog

Never mind I got it.

RewriteCond %{HTTP_HOST} ^www\.site1\.com$ [NC]
RewriteCond %{QUERY_STRING} ^onlythisID=8$ [NC]
RewriteRule ^folder/page\.cfm$ http://www.adifferentsite.com/folder/$ [NC,R=301,L]
Back to Top View dtnsemprog's Profile Search for other posts by dtnsemprog
 

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