Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to make a Apache rule to redirect an specific URL

http://www.domain.cl/section.do?one.second=8 --> http://www.newdomain.cl/

I was reading about using mod rewrite but all the examples i found use regular expressions and i don't want to other URL (like www.domain.cl/section.do?one.second=9) was affected for the rule that i want to create.

Any ideas?

Thanks.

share|improve this question

closed as not a real question by Magellan, Ward, freiheit, Wesley, Dennis Kaarsemaker Jun 1 '13 at 7:25

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

The query string isn't part of the URI as far as mod_rewrite is concerned, so you need to specifically check its contents. If you want to redirect for just that one specific URI and one specific exact query string, then you'll want..

RewriteCond %{QUERY_STRING} ^one\.second=8$
RewriteRule ^/section\.do$ http://www.newdomain.cl/ [R=301,L]
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.