Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -------------------------------------------------------
- # BEEF UP THE SERVER CONFIG
- # -------------------------------------------------------
- #
- # Change RewriteBase to a slash (/) when pushing live
- #
- AddHandler php5-script .php
- Options +FollowSymLinks -Indexes
- RewriteEngine on
- RewriteBase /
- # -------------------------------------------------------
- # MAKE SURE IT GOES TO THE NON-WWW. URL
- # -------------------------------------------------------
- RewriteCond %{HTTP_HOST} ^www.chezpim.com.*
- RewriteCond %{HTTP_HOST} !^chezpim.com$ [NC]
- RewriteRule ^(.*)$ http://chezpim.com/$1 [L,R=301]
- # -------------------------------------------------------
- # UPDATE THE PHP CONFIG
- # -------------------------------------------------------
- # Disable display of startup errors
- php_flag display_startup_errors off
- # Disable display of all other errors
- php_flag display_errors off
- # Disable html markup of errors
- php_flag html_errors off
- # Enable logging of errors
- php_flag log_errors off
- # Disable ignoring of repeat errors
- php_flag ignore_repeated_errors off
- # Disable ignoring of unique source errors
- php_flag ignore_repeated_source off
- # Enable logging of php memory leaks
- php_flag report_memleaks off
- # Preserve most recent error via php_errormsg
- php_flag track_errors on
- # Disable formatting of error reference links
- php_value docref_root 0
- # Disable formatting of error reference links
- php_value docref_ext 0
- # Specify path to php error log
- # php_value error_log php-errors.log
- # Specify recording of all php errors
- php_value error_reporting 999999999
- # Disable max error string length
- php_value log_errors_max_len 0
- # Increase the size of uploads a user can submit
- php_value upload_max_filesize 20M
- php_value post_max_size 20M
- php_value max_execution_time 40
- php_value max_input_time 40
- # -------------------------------------------------------
- # COMPRESS ALL FILES BEFORE THEY GET SENT
- # -------------------------------------------------------
- <IfModule mod_ext_filter.c>
- SetOutputFilter DEFLATE
- </IfModule>
- # -------------------------------------------------------
- # CACHING
- # -------------------------------------------------------
- # 1 Month
- <FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|otf)$">
- Header set Cache-Control "max-age=2592000"
- </FilesMatch>
- # 1 Week
- <FilesMatch "\.(js|css|pdf|swf)$">
- Header set Cache-Control "max-age=604800"
- </FilesMatch>
- # 10 minutes
- <FilesMatch "\.(html|htm|txt)$">
- Header set Cache-Control "max-age=600"
- </FilesMatch>
- # Don't Cache
- <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
- Header unset Cache-Control
- </FilesMatch>
- # -------------------------------------------------------
- # WORDPRESS
- # -------------------------------------------------------
- ErrorDocument 404 /404.html
- RewriteRule ^login wp-login.php [L]
- # Redirect the old TypePad URLs to a URL that WordPress will understand
- RewriteRule ^blogs/pim-who.html$ /about [L,R=301]
- RewriteRule ^blogs/([0-9]+)/([0-9]+)/([a-zA-Z0-9\+\-\_]+).html$ /$1/$2/$3 [L,R=301]
- RewriteRule ^category/(bake|cook|travel|pantry|drink)$ /$1 [L,R=301]
- RewriteRule ^pim_et_isabelle/atom.xml$ /feed/atom$1 [L,R=301]
- RewriteRule ^blogs/atom.xml$ /feed/atom$1 [L,R=301]
- RewriteRule ^blogs/rss.xml$ /feed$1 [L,R=301]
- <IfModule mod_rewrite.c>
- RewriteEngine On
- RewriteBase /
- RewriteRule ^index\.php$ - [L]
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule . /index.php [L]
- </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement