danrowden/magheroes/master/.htaccess - Htaccess File

danrowden/magheroes/master/.htaccess

# START local only

Options -Indexes
Options +FollowSymLinks
Options -MultiViews

DirectoryIndex index.php

# END local only
 
 
RewriteEngine on

# Some hosts require a rewritebase rule, if so, uncomment the RewriteBase line below. If you are running from a subdirectory, your rewritebase should match the name of the path to where stacey is stored.
# ie. if in a folder named 'stacey', RewriteBase /stacey
#RewriteBase /

ErrorDocument 404 /404.html

# BEGIN FEEDPRESS
RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]
RewriteCond %{HTTP_USER_AGENT} !FeedPress [NC]
RewriteRule ^feed/?$ http://feedpress.me/magheroes [R=302,NC,L]
# END FEEDPRESS

# Rewrite any calls to *.html, *.json, *.xml, *.atom, *.rss, *.rdf or *.txt if a folder matching * exists
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !public/
RewriteCond %{DOCUMENT_ROOT}/public/$1.$2 !-f
RewriteRule (.+).(html|json|xml|atom|rss|rdf|txt)$ $1/ [L]

# Add a trailing slash to directories
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} !(.)
#RewriteCond %{REQUEST_URI} !(.*)/$
#RewriteRule ([^/]+)$ $1/ [L]

# Rewrite any calls to /* or /app to the index.php file
RewriteCond %{REQUEST_URI} /app/$
RewriteRule ^app/ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ index.php?$1 [L]

# Rewrite any file calls to the public directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !public/
RewriteRule ^(.+)$ public/$1 [L]

On Github License

Files

Download PDF of Htaccess file
DOCUMENT_ROOT, HTTP_USER_AGENT, REQUEST_FILENAME, REQUEST_URI

Comments

Apache