Skip to content

Instantly share code, notes, and snippets.

@yamin27
Last active May 30, 2023 06:15
Show Gist options
  • Save yamin27/daed5f9631bee29af67480b782e9d7fd to your computer and use it in GitHub Desktop.
Save yamin27/daed5f9631bee29af67480b782e9d7fd to your computer and use it in GitHub Desktop.
<IfModule mod_rewrite.c>
# Turn Off mod_dir Redirect For Existing Directories
DirectorySlash Off
# Rewrite For Public Folder
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment