Possible Duplicate:
Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask?
Is it possible to redirect ./index.php?facebook to ./facebook.php? If so, how to do this?
Many thanks in advance,
Is it possible to redirect ./index.php?facebook to ./facebook.php? If so, how to do this? Many thanks in advance, |
|||
|
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.
|
There are at least two ways to do it.
RewriteEngine On
RewriteCond %{QUERY_STRING} =facebook [NC]
RewriteRule (.*)/index.php$ $1/facebook.php [R,L]
if (isset($_GET['facebook'])) {
header('Location: facebook.php');
exit;
}
|
|||
|