This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions (Forum Locked Forum Locked)
 Helicon Tech : Common Questions
Subject Topic: Redirect url with query str to other site
Author
Message |
dtnsemprog
Newbie


Joined: 10 March 2010
Location: United States
Posts: 19
Posted: 23 August 2010 at 3:12pm

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
 
dtnsemprog
Newbie


Joined: 10 March 2010
Location: United States
Posts: 19
Posted: 23 August 2010 at 3:30pm

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
 

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