Hello,
I am hoping that someone can explain the htaccess 301 redirect for me. I want to redirect a static .html to a dynamic ?id=1 format. However, I am unclear on the actual steps to create this.
I have done some reading and will try to explain what I understand to the best of my ability. Any help with this would be appreciated.
RewriteEngine on //allows server to process the redirect
RewriteCond %{QUERY_STRING} ^id=13$
//if page=id13 then redirect (however I wish to redirect a static address to a dynamic one is there another protocol to do this?)
RewriteRule ^/page.php$ http://www.example.com/newname.htm? [L,R=301]
//page is the variable for the root (ie index.php? page.php? ect. and is replaced with whichever dynamic root is used on the cms). I am unclear of whether the url following the "page.phpvariable" is the old address or the new one.
Can someone please help me to understand this a bit better or show me some code that would work to redirect several hundred static html pages to a dynamically generated cms?
Thanks a lot in advance.



Reply With Quote


Bookmarks