Help with Rewrite
Posted on 2006-06-24
I had asked another question related to Mod Rewrite, and after answering it julianmatz started helping me with actually implementing the Rewrite. I decided to open up another question to handle this specifically so that I can award the necessary points for this seperate issue.
Here is what julianmatz had written:
RewriteRule ^viewpost([0-9]*)\.html$ /index.php?viewpost=$1 [R=301,L]
The "R" flag will cause the page to redirect and the "=301" will cause a permanent redirect (the one you should always use to keep search engines happy).
If you just want to rewrite the URL without the redirect, you can simply leave out the "R" flag...
So basically if I leave out the stuff in the brackets at the end, then any links to discussion.php/viewpost=15.html will automatically display the page located at discussion.php?viewpost=15 without actually redirecting the browser (the URL will still display the html link in the browser window)?