Forum Moderators: phranque
I would like it to redirect to:
http://www.example.com/forumn-sortbyn-ordern-datecutn.html
Here is my .htaccess mod rewrite code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule forum(.*)-sortby(.*)-order(.*)-datecut(.*).html forumdisplay.php?fid=$1&sortby=$2&order=$3&datecut=$4 How do I make the above rewrite rule redirect automatically?
I have searched, but could not find an answer relevant to my question.
Thanks, I really appreciate anybodys help!
Also, if that's the case, the followning modification will amke your code more efficient:
http://www.example.com/forumdisplay.php?fid=n&sortby=n&order=n&datecut=n
RewriteRule ^forum([^-]+)-sortby([^-]+)-order([^-]+)-datecut([^.]+)\.html$ /forumdisplay.php?fid=$1&sortby=$2&order=$3&datecut=$4 [L]
Have a read through the documents cited in our forum charter [webmasterworld.com] -- You'll need that basic foundation to use mod_rewrite and regular expressions successfully. Also, there are some good posts in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim