Sagamore .htaccess: Difference between revisions
(Re-alphabetise) |
(emphasis) |
||
Line 19: | Line 19: | ||
We will start out defining redirects for the cononical addresses only, but '''see if we can cover the other possibilities with a blanket redirect'''. |
We will start out defining redirects for the cononical addresses only, but '''see if we can cover the other possibilities with a blanket redirect'''. |
||
We shouldn't have to deal with URLs collisions with the new site because we'll be [[Sagamore online goals 2014#URL_redirects|starting with never-used Wordpress post_IDs]]. |
We shouldn't have to deal with URLs collisions with the new site because we'll be '''[[Sagamore online goals 2014#URL_redirects|starting with never-used Wordpress post_IDs]]'''. |
||
<pre> |
<pre> |
Latest revision as of 12:38, 23 May 2014
To meet Sagamore online goals 2014#URL_redirects, build out a comprehensive .htaccess
file on the server that covers the existing Sagamore Hills PTA website (2011-2014) addresses, as well as addresses dropped from the site that still show up via search (but 404) as determined by checking search engines (via "site:sagamorehillspta.org"). We're leaving out other possible links for now (and will fix on an as-need basis).
- It's okay for popular links to forward to the same place another link already does or simply dump to the homepage
- Inlcude non-page (file) links too (when it makes sense)
- Don't inlcude (unless we find they're used somewhere?):
- "attachement types" (
/?attachement_id=
) - Comment feeds (
/?feed=…&page_id=…
) - Other auto-generated content (e.g. comment feeds)
- "attachement types" (
- List addresses in alphabetical order and thoroughly comment to ease future pruning
Discover links by:
- Browsing site content/file listing (Wordpress admin panel)
- Search for "
site:sagamorehillspta.org
" at search engines (https://www.google.com/search?q=site%3Asagamorehillspta.org) - See what the Internet Archive comes up with (https://web.archive.org/web/*/http://sagamorehillspta.org*)
Wordpress recognizes quite a few URLs for the same content. All content can by accessed by its "short link" which uses the post's ID as a query parameter, e.g., /?p=ID
, which will 301 to the contents cononical address (unless it's of type "post"). All Wordpress content are "posts" of various "types", such as posts, pages, attachments, etc. Each post type has its own canonical query parameter—"p" for posts, "page_id" for pages, "attachment_id" for attachements—but Wordpress will 301 from any of those to any other, regardelss of post type.
We will start out defining redirects for the cononical addresses only, but see if we can cover the other possibilities with a blanket redirect.
We shouldn't have to deal with URLs collisions with the new site because we'll be starting with never-used Wordpress post_IDs.
# .htaccess # Sagamore Hills PTA # http://www.9.0ne.org/w/Sagamore_.htaccess # Examples # # WITHOUT query parameters # RedirectMatch 301 ^/openhouse$ http://sagamorehillspta.org/?page_id=975 # WITH query parameters # Match on query string, match on root (/) (and "?" seems necessary?), append redirect url with "?" to avoid appending the matched query string, redirect permanently # RewriteCond %{QUERY_STRING} ^page_id=975$ # RewriteRule ^/?$ http://www.sagamorehillspta.org/openhouse? [redirect=301] # Necessary for "RewriteRule"s RewriteEngine on # /?p=179 # (old) After-Care Information # /?p=414 # Math Stars Available Here # /?p=701 # Annual Reflections Art Competition # /?p=791 # eBooks and AR Info # /?p=929 # Dia de los Muertos Festivaal, 5k & Fun Run # /?p=1003 # Sagamore Rocks! Auction # /?p=1006 # Sagamore Rocks! Auction Catalog # /?page_id=17 # History, Mission, Goals (an "About" page) # /?page_id=19 # Volunteers Needed! (plea with link to old spreadsheet # /?page_id=24 # Calendar # /?page_id=26 # Fundraising # /?page_id=28 # Advertising # /?page_id=30 # PTA Store # /?page_id=34 # PTA Board # /?page_id=36 # Contact # /?page_id=58 # Parent Resources (collection of links) # /?page_id=249 # Wellness and Safety # /?page_id=318 # PTA Enrichment (list of PTA programs/activities/efforts) # /?page_id=556 # Summer Fun! (list links to summer enrichment resources) # /?page_id=975 # Open House # /wp-content/uploads/2011/07/2011-to-2012-Volunteer-Oppy-Form.xls # Volunteer opportunites # /wp-content/uploads/2011/07/Current-PTA-Bylaws-Sagamore-Hills-as-of-2012117-12.pdf # /wp-content/uploads/2011/07/PTA-Budget-2011.pdf # /wp-content/uploads/2011/07/handbook2008-2009final1.pdf # Old handbook PDF # /wp-content/uploads/2011/07/JGB-2010-2011.doc # /wp-content/uploads/2011/07/Jr-Great-Books.pdf # Junior Great Books # /wp-content/uploads/2011/07/PTA-Membership-Form1.pdf # /wp-content/uploads/2011/07/Brasstown-Bald-Math-Mountain.pdf # /wp-content/uploads/2011/07/Math-Mountain-Sagamore-Hills-1.pdf # /wp-content/uploads/2011/07/Mount-Aconcagua-Math-Mountain.pdf # /wp-content/uploads/2011/07/Mount-Everest-Math-Mountain.pdf # /wp-content/uploads/2011/07/Mount-McKinley-Math-Mountain1.pdf # /wp-content/uploads/2011/07/Sagamore-Hills-Math-Mountain.pdf # /wp-content/uploads/2011/07/Stone-Mountain-Math-Mountain.pdf # Math Fact Mountains worksheets # /wp-content/uploads/2011/07/Sagamore-Ad-Rates-12-to-13.pdf # /wp-content/uploads/2011/07/Sagamore-Advertising-Opportunities-and-Costs.pdf # Advertising # /wp-content/uploads/2011/07/Check-Request-Form-2008.doc # /wp-content/uploads/2011/07/PTA-Funds-Transfer-Form.pdf # PTA Funds Transfer from (was linked from "Parent Resources") # /wp-content/uploads/2011/07/Sagamore-Calendar-Second-Semester.pdf # /wp-content/uploads/2011/07/Sagamore-Calendar-ver-4.doc # /wp-content/uploads/2011/07/SagamoreCalendar_2011-12_v14.pdf # /wp-content/uploads/2011/07/SagamoreCalendar_2012-13_v7.pdf # /wp-content/uploads/2011/07/SagamoreCalendar-2011-to-2012.pdf # Calendars # /wp-content/uploads/2011/07/Fundraising.doc # /wp-content/uploads/2011/07/Fundraising1.doc # /wp-content/uploads/2011/07/Fundraising2.doc # Fundraising # /wp-content/uploads/2011/08/Great-American-Fundraising.pdf # Fundraising # /wp-content/uploads/2011/08/Sagamore-ASEDP.pdf # Afterschool care # /wp-content/uploads/2011/08/SH-Parent-Outreach-Committee.pdf # /wp-content/uploads/2011/10/Enrichment-Overview.doc # Volunteer opportunites # /wp-content/uploads/2011/10/Gift-Cards-Oct-2011.xls # Fundraising # /wp-content/uploads/2012/01/Math-Stars-Grade-11.pdf # /wp-content/uploads/2012/01/Math-Stars-Grade-21.pdf # /wp-content/uploads/2012/01/Math-Stars-Grade-31.pdf # /wp-content/uploads/2012/01/Math-Stars-Grade-41.pdf # /wp-content/uploads/2012/01/Math-Stars-Grade-51.pdf # /wp-content/uploads/2012/01/Math-Stars-Kindergarten-11.pdf # Math Stars worksheets # /wp-content/uploads/2012/01/Sagamore-Auction-business-donation-form-2012.pdf # /wp-content/uploads/2012/01/Sagamore-Rocks-Donation-Form-2012.pdf # Sagamore Rocks! Auction # /wp-content/uploads/2012/02/King-Midas-Flyer-with-Ticket-Order-Form2.pdf # Play/performance # /wp-content/uploads/2012/06/1st-grade-reading-list.pdf # /wp-content/uploads/2012/06/1st-Grade-Reading-Log.pdf # /wp-content/uploads/2012/06/1st-to-3rd-Grade-Discovery-Program.pdf # /wp-content/uploads/2012/06/4th-and-5th-Grade-Discovery-Program1.pdf # /wp-content/uploads/2012/06/3rd-grade-step-up-2012-.pdf # /wp-content/uploads/2012/06/Art-Summer-Newsletter.pdf # /wp-content/uploads/2012/06/First-Grade-News.pdf # /wp-content/uploads/2012/06/General-Summer-Reading-Ideas.doc # /wp-content/uploads/2012/06/Music-Summer-Newsletter.pdf # /wp-content/uploads/2012/06/PE-Summer-Newsletter.pdf # /wp-content/uploads/2012/06/rising-2nd-grade-reading-list.pdf # /wp-content/uploads/2012/06/Rising-4th-Grade-Welcome.pdf # /wp-content/uploads/2012/06/Rising-5th-Grade-Welcome.pdf # /wp-content/uploads/2012/06/Third-Grade-Addition-and-Subtraction-Charts.pdf # /wp-content/uploads/2012/06/Third-Grade-Multiplication-and-Division-Chart.pdf # (linked from "Summer Fun!") # /wp-content/uploads/2012/09/Reflections-web-page-info-2012.doc # Reflections 2012-2013 info # /wp-content/uploads/2013/09/Registration-Form-w-Waiver.pdf # /wp-content/uploads/2013/09/Registration-Form-w-Waiver-Spanish.pdf # /wp-content/uploads/2013/09/Taqueria-El-Vecino-Menu.pdf # Dia de los Muertos