Take the 2-minute tour ×
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 http://www.mysite.com/listingsecond.php?ID=1 to http://www.mysite.com/listingsecond?

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

share|improve this question

marked as duplicate by John Conde Feb 22 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 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 at 9:52

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.