Forum Moderators: phranque
# -- LG .htaccess Generator Start --
# .htaccess generated by LG .htaccess Generator v1.0.0
# <snip>
# addon domain exceptions
RewriteCond %{HTTP_HOST} ^(www\.)?sampleurl\.com
RewriteRule .* - [L]
# Fix queries for actions, urls and css in EE
RewriteCond %{QUERY_STRING} ^(ACT=.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(URL=.*)$ [NC,OR]
RewriteCond %{QUERY_STRING} ^(CSS=.*)$ [NC]
RewriteRule ^(.*)$ /index.php\?&%{QUERY_STRING} [L]
# secure .htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
# Dont list files in index pages
IndexIgnore *
# EE 404 page for missing pages
ErrorDocument 404 /index.php?/
# Simple 404 for missing files
<FilesMatch "(\.jpe?g|gif|png|bmp)$">
ErrorDocument 404 "File Not Found"
</FilesMatch>
RewriteEngine On
RewriteCond %{REQUEST_URI} "/private/" [or]
RewriteCond %{REQUEST_URI} "/SI/"
RewriteRule (.*) $1 [L]
RewriteBase /
# remove the www
RewriteCond %{HTTP_HOST} ^(www\.$) [NC]
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteRule ^blog/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?$ blog/$4/ [R=301,L]
# Add a trailing slash to paths without an extension
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule ^(.*)$ $1/ [L,R=301]
# Remove index.php
# Uses the "include method"
# http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/(site|search|Entertainment|Index|About|Activities|Recipes|Contact|Sponsors|embeds|sponsors_gallery|galleries|Location|Blog||members|P[0-9]{2,8}) [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Remove IE image toolbar
<FilesMatch "\.(html|htm|php)$">
Header set imagetoolbar "no"
</FilesMatch>
# -- LG .htaccess Generator End -- [edited by: jdMorgan at 6:58 am (utc) on Mar 10, 2010]
[edit reason] Removed promotional link and private domain citation. [/edit]