Home > Codeigniter | Genel | PHP | Programlama > Codeigniter URL Yapısından index.php Kaldırma

Codeigniter URL Yapısından index.php Kaldırma

Codeigniter URL yapısını SEO için düzenlemek gerektiğinde index.php bağlantısının tüm URL’lerden kaldıması için yine .htaccess kullanılmalıdır. Aşağıdaki .htaccess dosyası Codeigniter projesinin kök dizininde bulundurulmalı ve Codeigniter ayarlarının yapıldığı application->config->config.php dosyasındaki $config['index_page'] = ‘index.php’; değeri $config['index_page'] = ”; olarak değiştirilmelidir.

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

, , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 

Trackbacks:0

Listed below are links to weblogs that reference
Codeigniter URL Yapısından index.php Kaldırma from uguryildiz.net
TOP