forked from ushahidi/Ushahidi_Web
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turns out we *do* need a .htaccess in the default repo
- Loading branch information
Sam Minnee
committed
Feb 26, 2011
1 parent
d705c8a
commit 0e2a7bb
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.*swp | ||
.htaccess | ||
*~ | ||
application/logs/* | ||
application/cache/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |