Skip to content

Instantly share code, notes, and snippets.

@sebduggan
Created August 17, 2010 16:27
Show Gist options
  • Save sebduggan/530667 to your computer and use it in GitHub Desktop.
Save sebduggan/530667 to your computer and use it in GitHub Desktop.
RewriteEngine On
# If it's a real path, just serve it
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
#########################
##### MySite
#########################
# Redirect robots.txt/sitemap.xml from the webroot
RewriteCond %{HTTP:Host} ^www.mysite.com$
RewriteRule ^(sitemap\.xml|robots\.txt)$ /mysite/$1 [NC,L]
#########################
##### General
#########################
# Redirect if no trailing slash
RewriteRule ^(.+[^/])$ $1/ [R=301,L,QSA]
# Rewrite Mura CMS URL paths
RewriteRule ^(.*)$ /index.cfm%{REQUEST_URI} [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment