RewriteEngine on RewriteBase / RewriteRule ^/?article/([a-zA-Z0-9_\-]+)$ /rewrites/article.php?i=$1 [L] RewriteRule ^/?admin/?article/([a-zA-Z0-9_\-]+)$ /rewrites/admin-article.php?i=$1 [L] RewriteRule ^/?assets/([a-zA-Z0-9_\-./]+)$ /rewrites/assets.php?i=$1 [L] ErrorDocument 404 /errs/404.php ErrorDocument 403 /errs/403.php