Forum Moderators: phranque
RewriteEngine On
RewriteRule viewtopic.php?topic_id=(.*)&forum=(.*) viewtopic.php?topic_id=$1 [R=301,L]
i want the url to look like : website.com/viewtopic.php?topic_id=5
instead of website.com/viewtopic.php?topic_id=5&forum=2
Anybody have an idea about how to do that ?
Greetings from Morocco.
What is matched?The Pattern will initially be matched against the part of the URL after the hostname and port, and before the query string. If you wish to match against the hostname, port, or query string, use a RewriteCond with the %{HTTP_HOST}, %{SERVER_PORT}, or %{QUERY_STRING} variables respectively.
RewriteEngine On
RewriteCond %{QUERY_STRING} topic_id=(.*)&forum=(.*)
RewriteRule viewtopic.php [website.com...] [R=301,L]
didn't work neither ...