Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

This question already has an answer here:

How to rewrite my URL from to

How can I rewrite to my .htaccess in PHP to do this?

share|improve this question

marked as duplicate by John Conde Feb 22 '14 at 13:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

You can search on Google, I just found on Stack Overflow the answer to your question. – Zistoloen Feb 22 '14 at 9:50
what you want is to redirect without using .htaccess? If that is what you want, my answer may help, if that is not what you want, please clarify the question a bit. – PatomaS Feb 22 '14 at 9:52
Or are you wanting to --write to your .htaccess file using PHP?? – w3d Mar 13 at 16:42

1 Answer 1

On your PHP file, use the $_GET variable to process the query as you need, then when generating the response, redirect to the address that you want using the header function. Specifically, the location attribute

share|improve this answer

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