Rush Posted April 24, 2006 Report Share Posted April 24, 2006 I thought I would post a good way to redirect search engines, outside links, etc when you change to a CMS or change directories of where TNG is at:Here is what part of my htaccess file looks:Redirect 301 /cemphototrans.php http://www.bythedrop.com/page.php?1Redirect 301 /mostwanted.php http://www.bythedrop.com/page.php?4RedirectMatch 301 ^/getperson.php(.*) http://www.bythedrop.com/e107_plugins/tngIL/getperson.php$1RedirectMatch 301 ^/surnames.php(.*) http://www.bythedrop.com/e107_plugins/tngIL/surnames.php$1Redirect 301 /whatsnew.php http://www.bythedrop.com/e107_plugins/tngIL/whatsnew.phpRedirect 301 /browsephotos.php http://www.bythedrop.com/e107_plugins/tngIL/browsephotos.phpRedirect 301 /cemeteries.php http://www.bythedrop.com/Redirect 301 /browsenotes.php http://www.bythedrop.com/e107_plugins/tngIL/browsenotes.phpRedirect 301 /browsesources.php http://www.bythedrop.com/RedirectMatch 301 ^/places.php(.*) http://www.bythedrop.com/e107_plugins/tngIL/places.php$1Redirect 301 /anniversaries.php http://www.bythedrop.com/Redirect 301 /reports.php http://www.bythedrop.com/RedirectMatch 301 ^/browsetrees.php(.*) http://www.bythedrop.com/e107_plugins/tngIL/browsetrees.php$1Redirect 301 /showheadstone.php http://www.bythedrop.com/RedirectMatch 301 ^/pedigree.php(.*) http://www.bythedrop.com/e107_plugins/tngIL/pedigree$1Redirect 301 /descend.php http://www.bythedrop.com/Redirect 301 /relateform.php http://www.bythedrop.com/Redirect 301 /timeline2.php http://www.bythedrop.com/RedirectMatch 301 ^/showmap.php(.*) http://www.bythedrop.com/e107_plugins/tngIL/showmap.php$1Redirect 301 /suggest.php http://www.bythedrop.com/RedirectMatch 301 ^/familygroup.php http://www.bythedrop.com/e107_plugins/tngIL/familygroup.php$1Redirect 301 /search.php http://www.bythedrop.com/RedirectMatch 301 ^/showphoto.php(.*) http://www.bythedrop.com/e107_plugins/tngIL/showphoto.php$1Redirect 301 /searchform.php http://www.bythedrop.com/Redirect 301 /showlog.php http://www.bythedrop.com/Redirect 301 /showhistory.php http://www.bythedrop.com/Redirect 301 /extrastree.php http://www.bythedrop.com/RedirectMatch 301 ^/pedigree.php(.*) http://www.bythedrop.com/e107_plugins/tngIL/pedigree.php$1Redirect 301 /ultraped.php http://www.bythedrop.com/Redirect 301 /ahnentafel.php http://www.bythedrop.com/Redirect 301 /placesearch.php http://www.bythedrop.com/redirect 301 /timeline.php http://www.bythedrop.com/ A brief explaination: Redirect 301 /cemphototrans.php http://www.bythedrop.com/page.php?1this is a straight one page redirect. When someone goes to http://www.bythedrop.com/cemphototrans.php they will automatically get kicked over to http://www.bythedrop.com/page.php?1 RedirectMatch 301 ^/getperson.php(.*) http://www.bythedrop.com/e107_plugins/tngIL/getperson.php$1This looks for all pages with http://www.bythedrop.com/getperson.php? and redirects them to the correct directory http://www.bythedrop.com/e107_plugins/tngIL/getperson.php?.So when someone hits an old link, they will not get a 404 page, but rather a redirect to the same persons page in the new directory.Maybe it will come in handy for someone... Rush Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.