Sagamore .htaccess: Difference between revisions

From Parents
Jump to navigation Jump to search
(Add link discovery techniques)
(file intro)
Line 11: Line 11:
* See what the Internet Archive comes up with
* See what the Internet Archive comes up with


<pre>
<blockquote>
# .htaccess
# Sagamore Hills PTA
# http://www.9.0ne.org/w/Sagamore_.htaccess


# Examples
</blockquote>
#
# 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

</pre>





Revision as of 11:25, 15 May 2014

To meet Sagamore online goals 2014#URL_redirects, build out a comprehensive .htaccess file 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 (404) (are there any?).

  • Include all links, even if it forwards to the same place another link already does or make it simply dump to the homepage
  • Inlcude non-page (file) links too (when it makes sense)
  • List addresses in alphabetical order and thoroughly comment to ease future pruning

Discovering links by:

  • Browsing site content/file listing (admin panel)
  • Search for "site:sagamorehillspta.org" with search engines
  • See what the Internet Archive comes up with
# .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