cyve/code/master/htaccess/.htaccess - Htaccess File

cyve/code/master/htaccess/.htaccess

AuthUserFile "E:wwwgithubhtaccess.htpasswd"
AuthGroupFile "E:wwwgithubhtaccess.htgroup"
AuthName Private
AuthType Basic

# Disable the directory's index
Options -Indexes

<limit GET POST>
  Order deny,allow
  Deny from all
  
  # Allows access to local connections
  #Allow from localhost
  
  # Allows access to user "admin"
  #require user admin
  
  # Allows access to users in group "users"
  #require group users
  
  # Allows access to registered users
  #require valid-user
  
  # Allows access to anonymous connections
  Allow from all
  
  satisfy any
</Limit>

# Protect ht files
<FilesMatch "^.ht">
  Order allow,deny
  Deny from all
</FilesMatch>

# Allows access to users in group "users"
<FilesMatch private.html>
  Order allow,deny
  Deny from all
  require group users
  satisfy any
</FilesMatch>

# Allows access to users in group "administrators"
<FilesMatch admin.html>
  Order allow,deny
  Deny from all
  require group administrators
  satisfy any
</FilesMatch>

# Redirect all request to index.php
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>

# CORS
<IfModule mod_headers.c>
  Header set Access-Control-Allow-Origin "*"
  Header set Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
  Header set Access-Control-Allow-Credentials "true"
  Header set Access-Control-Allow-Headers "Authorization,DNT,User-Agent,Keep-Alive,Content-Type,accept,origin,X-Requested-With"
</IfModule>

On Github License

Files

Download PDF of Htaccess file
GET, POST, PUT, REQUEST_FILENAME, X-Requested-With

Comments

Apache