# Written by Alessandro Polo 2009 # www.alessandropolo.name ############################################################ # many web hosting companies don't allow that: #Options +FollowSymLinks -Indexes RewriteEngine on RewriteBase / RewriteRule ^work\.html$ work.php RewriteRule ^lab\.html$ lab.php RewriteRule ^skills\.html$ skills.php RewriteRule ^extras\.html$ extras.php RewriteRule ^search\.html$ search.php RewriteRule ^search$ search.php RewriteRule ^sitemap\.html$ sitemap.php RewriteRule ^about\.html$ about.php RewriteRule ^contact\.html$ contact.php ############################################################ # Blog Mappings BLOG # RewriteRule ^blog/([0-9]{14})/?$ blog/index.php?id=$1 RewriteRule ^blog/([0-9]{4})/([0-9]{2})/([0-9]{2})/?$ blog/index.php?year=$1&month=$2&day=$3 RewriteRule ^blog/([0-9]{4})/([0-9]{2})/([0-9]{1})/?$ blog/index.php?year=$1&month=$2&day=$3 RewriteRule ^blog/([0-9]{4})/([0-9]{1})/([0-9]{1})/?$ blog/index.php?year=$1&month=$2&day=$3 RewriteRule ^blog/([0-9]{4})/([0-9]{1})/([0-9]{2})/?$ blog/index.php?year=$1&month=$2&day=$3 RewriteRule ^blog/([0-9]{4})/([0-9]{2})/?$ blog/index.php?year=$1&month=$2 RewriteRule ^blog/([0-9]{4})/([0-9]{1})/?$ blog/index.php?year=$1&month=$2 RewriteRule ^blog/([0-9]{4})/?$ blog/index.php?year=$1 RewriteRule ^blog/blog\.html$ /blog/render.html.php?%{QUERY_STRING} # ############################################################ ############################################################ # TAGS TAGS # RewriteRule ^tags/(.+)$ /tag.php?tag=$1 RewriteRule ^tags$ /tag.php?%{QUERY_STRING} # ############################################################ ############################################################ # SEARCH SEARCH # RewriteRule ^search/(.+)$ /search-sync.php?q=$1 RewriteRule ^search$ /search-sync.php?%{QUERY_STRING} # ############################################################ ############################################################ # RSS and XML Masquerading RSS and XML # RewriteRule ^feed\.rss$ feed-rss.php RewriteRule ^sitemap\.xml$ sitemap-xml.php # ############################################################ ############################################################ ############################################################ # Pictures Mappings PICTURES # RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^pictures/(.+)/$ /pictures/browse.php?folder=$1&%{QUERY_STRING} # ############################################################ ############################################################ # Projects PROJECTS # RewriteRule ^projects/projects\.html$ projects/render.html.php RewriteRule ^papers/papers\.html$ papers/render.html.php RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^projects/(.+)/$ /projects/browse.php?project=$1&%{QUERY_STRING} # ############################################################ ############################################################ # MUSIC MUSIC # RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^music/(.+)/$ /music/index.php?album=$1&%{QUERY_STRING} # ############################################################ ############################################################ ############################################################ # Error documents mapping ERRORS # ErrorDocument 400 /_errors/error.php?code=400 ErrorDocument 401 /_errors/error.php?code=401 ErrorDocument 403 /_errors/error.php?code=403 ErrorDocument 404 /_errors/error.php?code=404 ErrorDocument 500 /_errors/error.php?code=500 # ############################################################