Skip to content

Instantly share code, notes, and snippets.

@ScottPhillips
Created February 2, 2012 07:03
Show Gist options
  • Save ScottPhillips/1722101 to your computer and use it in GitHub Desktop.
Save ScottPhillips/1722101 to your computer and use it in GitHub Desktop.
My Default .htaccess File for Running on RackSpace Cloud Sites
########################################
# Adjust Memory/Post/Execution/ Upload Size
########################################
php_value max_execution_time 3600
php_value upload_max_filesize 100M
php_value post_max_size 220M
php_value memory_limit 256M
########################################
# Display Errors: (Comment out for no Errors)
########################################
php_flag display_errors 1
php_value error_reporting 8191
########################################
# Uncomment any of the below if needed.
########################################
# If WordPress
########################################
#<IfModule mod_rewrite.c>
#RewriteEngine On
#RewriteBase /
#RewriteRule ^index\.php$ - [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule . /index.php [L]
#</IfModule>
########################################
## Custom Error Documents
########################################
# HTTP error 401 (unauthorized)
# ErrorDocument 401 /error/401.php
# HTTP error 400 (bad request)
# ErrorDocument 400 /error/400.php
# HTTP error 403 (forbidden)
# ErrorDocument 403 /error/403.php
# HTTP error 404 (not found)
# ErrorDocument 404 /error/404.php
# HTTP error 500 (internal server error)
# ErrorDocument 500 /error/500.php
########################################
# Enable Rewriting
########################################
# RewriteEngine on
# RewriteBase /
# Depending on the application, you may need to specify the RewriteBase to include subdirectory the application is installed
# RewriteBase /subdirectory
########################################
# Disable Caching:
########################################
# <IfModule mod_php5.c>
# <IfModule mod_headers.c>
# <FilesMatch "\.(ico|flv|jpg|jpeg|png|gif|swf|mpeg|wav|mp3|wma|mpg|css|js)$">
# Header set Cache-Control "no-cache"
# </FilesMatch>
# </IfModule>
# </IfModule>
########################################
# Turn OFF Cloud Sites PHP Op-Code Cache
########################################
# php_flag xcache.cacher 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment