Skip to content

Commit

Permalink
Turns out we *do* need a .htaccess in the default repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Minnee committed Feb 26, 2011
1 parent d705c8a commit 0e2a7bb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.*swp
.htaccess
*~
application/logs/*
application/cache/*
Expand Down
34 changes: 34 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Turn on URL rewriting only when mod rewrite is turn on

<IfModule mod_rewrite.c>
RewriteEngine On

# Installation directory
RewriteBase /

# Protect application and system files from being viewed
RewriteRule ^(application|modules|system) - [F,L]

# Prevent schedulers from being accessed remotely
RewriteCond %{REMOTE_ADDR} !^127.0.0.1$
RewriteRule ^.*/scheduler/.*$ - [F,L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT,L]
</IfModule>

# Protect the htaccess from being viewed
<Files .htaccess>
order allow,deny
deny from all
</Files>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

#Follow symlinks
Options +FollowSymlinks

0 comments on commit 0e2a7bb

Please sign in to comment.