Skip to content

Instantly share code, notes, and snippets.

View rohitgupta27's full-sized avatar

Rohit Gupta rohitgupta27

View GitHub Profile
<RoutingRules>
<RoutingRule>
<Condition>
<HttpErrorCodeReturnedEquals>403</HttpErrorCodeReturnedEquals>
</Condition>
<Redirect>
<HostName>MyDomainName.com</HostName>
<ReplaceKeyWith>your/Key/here</ReplaceKeyWith>
</Redirect>
</RoutingRule>
<?php
public static function getShortCode() {
do {
$shortCode = str_random(6);
// Check if we have already used this shortcode
if(!Storage::disk('s3')->exists($shortCode)) {
return $shortCode;
}