SunDi3yansyah/GitHubAPI-CodeIgniter-SemanticUI/master/.htaccess - Htaccess File

SunDi3yansyah/GitHubAPI-CodeIgniter-SemanticUI/master/.htaccess

<IfModule mod_rewrite.c>
  RewriteEngine On
  # RewriteBase /
  Options +FollowSymLinks -Indexes

  # RewriteCond %{HTTPS} off
  RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

  # Enable WWW
  # RewriteCond %{HTTP_HOST} ^www.sundi3yansyah.id [nocase]
  # RewriteRule ^(.*) https://sundi3yansyah.id/$1 [last,redirect=301]

  # Disable WWW
  RewriteCond %{HTTP_HOST} ^www.sundi3yansyah.id [NC]
  RewriteRule (.*) https://sundi3yansyah.id/$1 [L,R=301]

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.+)/$ /$1 [L,R=301]

  RewriteCond %{REQUEST_URI} ^../sys.*
  RewriteRule ^(.*)$ /index.php/$1 [L]

  RewriteCond %{REQUEST_URI} ^app.*
  RewriteRule ^(.*)$ /index.php/$1 [L]

  RewriteCond $1 !^(index.php|assets|robots.txt)
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>

ErrorDocument 404 /index.php
ErrorDocument 403 /index.php

<IfModule mod_headers.c>
  Header set X-XSS-Protection "1; mode=block"
</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, HTTPS, REQUEST_FILENAME, REQUEST_URI, SERVER_NAME

Comments

Apache