Skip to content

Instantly share code, notes, and snippets.

View sceccaldi's full-sized avatar

Sylvain Ceccaldi sceccaldi

View GitHub Profile
@sceccaldi
sceccaldi / path.php
Created March 18, 2013 09:42
Display path of the repo
<?php
$dir = dirname(__FILE__);
echo "<p>Full path to this dir: " . $dir . "</p>";
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/.htpasswd" . "</p>";
?>
@sceccaldi
sceccaldi / .htaccess
Created March 18, 2013 09:40
Remove index.php from Expression Engine 2 URLs
<IfModule mod_rewrite.c>
RewriteEngine On
# Removes index.php from ExpressionEngine URLs
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
@sceccaldi
sceccaldi / .gitignore
Created March 18, 2013 09:38
.gitignore for Expression Engine 2
.DS_Store
# Images
images/avatars/
images/captchas/
images/smileys/
images/member_photos/
images/signature_attachments/
images/pm_attachments/
images/uploads/