RewriteEngine on


#RewriteBase   /

#category pages
RewriteRule 	^cat(\d+)/([a-z0-9\-_]+)\.html$			category.php?catId=$1&%{QUERY_STRING}

#the product/item
RewriteRule 	^itm/([0-9A-Z]+)/([a-z0-9\-_]+)\.html$		product.php?asin=$1&%{QUERY_STRING}

#content pages
RewriteRule 	^cnt/([a-zA-Z\-0-9_]+)\.html$		pages.php?page=$1&%{QUERY_STRING}


ErrorDocument 403 "<!DOCTYPE html><head><title>403 - Access Denied!</title><link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css' type='text/css' /><style type='text/css'>.error-code{font-size:88px;}h2{margin:2px;}</style></head><body><div class='container'><div class='row'><div class='col-xs-12 col-xs-offset-0 col-md-6 col-md-offset-3 text-center'>    <h1 class='error-code text-danger'>Error 403</h1><div class='alert alert-danger'><h2>Access Denied!!</h2></div><div class='alert alert-info'>If you believe this is an error, please mail us about it!<br/><i>bugs at zstore dot anywhere</i></div></div></div></div></body></html>"

ErrorDocument 404 "<!DOCTYPE html><head><title>404 - Resource not found!</title><link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css' integrity='sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO' crossorigin='anonymous' type='text/css' /><style type='text/css'>.error-code{font-size:88px;}h2{margin:2px;}</style></head><body><div class='container'><div class='row'><div class='col col-lg-6 offset-lg-3 text-center'>    <h1 class='error-code text-secondary'>Error 404</h1><p>The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.</p><a href='/' class='btn btn-block btn-secondary'>&#127968; Take Me Home!</a></div></div></div></body></html>"
