Skip to content

Instantly share code, notes, and snippets.

@natflow
Created January 18, 2012 23:43
Show Gist options
  • Save natflow/1636571 to your computer and use it in GitHub Desktop.
Save natflow/1636571 to your computer and use it in GitHub Desktop.
failing .htaccess
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
# Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
#RewriteRule (.*) http://www.example.com/$1 [R=301,L]
# Exclude /assets and /manager directories from rewrite rules
RewriteRule ^(manager|assets) - [L]
# catch slugs
RewriteRule ^slugCatcher.php - [L]
RewriteRule ^([^/-]+-.+)$ slugCatcher.php?q=$1 [L,QSA,NS]
# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ec/ajax index.php?q=ajax [QSA]
RewriteRule ^ec/ index.php?q=ec [QSA]
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NS]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment