Skip to content

Instantly share code, notes, and snippets.

@fundasarikaya
Created January 9, 2021 17:25
Show Gist options
  • Save fundasarikaya/e5d289b7be299e34bf25b99ac66c0495 to your computer and use it in GitHub Desktop.
Save fundasarikaya/e5d289b7be299e34bf25b99ac66c0495 to your computer and use it in GitHub Desktop.
php-htaccess Codeigniter php gerekli bir kaç access komutları
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#This last condition enables access to the images and css folders, and the robots.txt file
RewriteCond $1 !^(index\.php|public|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
#RewriteRule (.+) index.php?p=$1 [QSA,L]
SetEnv CI_ENV development
<IfModule mod_headers.c>
<FilesMatch ".(eot|otf|svg|ttf|woff|woff2)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
<Files composer.json>
Order allow,deny
Deny from all
</Files>
<Files composer.lock>
Order allow,deny
Deny from all
</Files>
<Files license.txt>
Order allow,deny
Deny from all
</Files>
<Files readme.rst>
Order allow,deny
Deny from all
</Files>
<Files contributing.md>
Order allow,deny
Deny from all
</Files>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment