RewriteEngine on php_flag zlib.output_compression on # If you checked out main into a different directory than 'trunk', # make the appropriate change here and for ErrorDocument below. RewriteRule .* - [E=MAIN_ROOT:trunk/app/control] # Change the USERNAMEs below to your username # if running in your personal newdev RewriteBase /~USERNAME/newdev/main/ ErrorDocument 404 /~USERNAME/newdev/main/trunk/app/control/content/error.php5?path= # If running in a document root, uncomment these, comment out above #RewriteBase / #ErrorDocument 404 /main/app/control/content/error.php5?path= RewriteRule ^index.html$ / [R,QSA] RewriteRule ^logout/?$ %{ENV:MAIN_ROOT}/admin/login.php5?logout=true&path=about [L,QSA] # About pages RewriteRule ^about/(interns|apprentices|[0-9]+)/(year)*([0-9]+)/*$ \ %{ENV:MAIN_ROOT}/about/aboutpage.php5?type=$1&year=$3&edit=false&path=about [L,QSA] RewriteRule ^about/(interns|apprentices)/$ \ %{ENV:MAIN_ROOT}/about/aboutpage.php5?type=$1&path=about/$1 [L,NC,QSA] RewriteRule ^about/(interns|apprentices)$ \ /about/$1/ [L,NC,QSA] RewriteRule ^about/staff/?$ \ %{ENV:MAIN_ROOT}/about/staff.php5?path=about/staff [L,QSA] RewriteRule ^about/contact/([A-Za-z\_\-]+)$ \ %{ENV:MAIN_ROOT}/about/contactForm.php5?recipient=$1&path=about/contact/$1 [L,QSA] RewriteRule ^about/newsletter/([A-Za-z\d]+)/?$ \ %{ENV:MAIN_ROOT}/about/newsletter.php5?issue=$1 [L,QSA] RewriteRule ^search/?$ \ %{ENV:MAIN_ROOT}/search/search.php5 [L,QSA] # Admin pages RewriteRule ^admin/?$ \ %{ENV:MAIN_ROOT}/admin/admin.php5?path=about [L,QSA] RewriteRule ^admin/about/?$ \ %{ENV:MAIN_ROOT}/admin/about.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/people/?$ \ %{ENV:MAIN_ROOT}/admin/showPeople.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/schools/?$ \ %{ENV:MAIN_ROOT}/admin/showSchools.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/addpeople/?$ \ %{ENV:MAIN_ROOT}/admin/addPeople.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/addschool/?$ \ %{ENV:MAIN_ROOT}/admin/addSchool.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/profile/person?$ \ %{ENV:MAIN_ROOT}/admin/editPeople.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/profile/school?$ \ %{ENV:MAIN_ROOT}/admin/editSchool.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/profile/updatePerson?$ \ %{ENV:MAIN_ROOT}/admin/updatePerson.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/profile/updatePositions?$ \ %{ENV:MAIN_ROOT}/admin/updatePositions.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/profile/updateSchools?$ \ %{ENV:MAIN_ROOT}/admin/updateSchools.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/profile/addPeople?$ \ %{ENV:MAIN_ROOT}/admin/addPeople.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/profile/addPosition?$ \ %{ENV:MAIN_ROOT}/admin/addPosition.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/about/profile/addSchool?$ \ %{ENV:MAIN_ROOT}/admin/addSchool.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/test/?$ \ %{ENV:MAIN_ROOT}/admin/test.php5?type=$1&path=about [L,QSA] RewriteRule ^admin/form/?$ \ %{ENV:MAIN_ROOT}/admin/form.php5?type=$1&path=about [L,QSA] # License page RewriteRule ^licensing/?$ \ %{ENV:MAIN_ROOT}/content/licensing.php5 [L,NC] # Featured content RewriteRule ^featured/ASLDiseaseModel/(.+)/(.+)/?$ \ %{ENV:MAIN_ROOT}/content/featured/ASLDiseaseModel/videoPlayer.php5?path=$1&mov=$2 [R,NC,QSA] RewriteRule ^(featured/DiseaseModel)$ \ featured/DiseaseModel/ [L,R,NC] RewriteRule ^featured/DiseaseModel/?$ \ %{ENV:MAIN_ROOT}/content/pageLoad.php5?path=featured/DiseaseModel/ [L,NC] # Redirects away from main site content RewriteRule ^featured/tarheeloftheweek/?$ \ http://www.newsobserver.com/166/story/1472490.html [R,QSA] # New names for v2.0 sections RewriteRule ^faculty/$ /educators/ [R,QSA] RewriteRule ^student/$ /students/ [R,QSA] RewriteRule ^curriculum/$ /activities/ [R,QSA] RewriteRule ^contact/?$ /about/contact/ [R,QSA] # Serve up the main site content RewriteRule ^$ home/ [QSA] RewriteRule ^home/?$ \ %{ENV:MAIN_ROOT}/content/pageLoad.php5?path= [L,QSA] RewriteRule ^images$ \ images/ [L,R,QSA] RewriteRule ^images/(.*)$ \ /media/content/main/images/$1 [L,QSA] RewriteRule ^((?:about|board/member|students|parents|educators|activities|news|sitemap|featured|2009|home)(?:/|/.*/)[^./]*[^/])$ \ $1/ [L,R,QSA] RewriteRule ^((?:about|students|parents|educators|activities|news|sitemap|featured|2009|home|pr)/.*)$ \ %{ENV:MAIN_ROOT}/content/pageLoad.php5?path=$1 # Redirects separate from main site content RewriteRule ^unchem/?$ unchem/ [NC,L,QSA] RewriteRule ^ncsi/?$ http://computationalscience.org [NC,R,QSA] RewriteRule ^directions/?$ parents/directions [R,QSA] RewriteRule ^facebook/?$ http://www.facebook.com/pages/Shodor/90141150866 [R,QSA] RewriteRule ^twitter/?$ http://www.twitter.com/shodor [R,QSA] RewriteRule ^interns/?$ about/interns/ [R,QSA] RewriteRule ^monte/?$ featured/monte/ [R,QSA]