Skip to content

Instantly share code, notes, and snippets.

@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@Antnee
Antnee / password_hash_cost_calculator.php
Created February 29, 2016 13:48
PHP password_hash() cost calculator
<?php
/**
* Password Hash Cost Calculator
*
* Set the ideal time that you want a password_hash() call to take and this
* script will keep testing until it finds the ideal cost value and let you
* know what to set it to when it has finished
*/
// Milliseconds that a hash should take (ideally)