Mam problem z mod_rewrite w Code Igniter, piszę tutaj, ponieważ jest to bardziej problem z .htaccess lub Apache niż z samym frameworkiem.
Mam taki plik .htaccess:
CODE
RewriteEngine on
RewriteCond $1 !^([a-zA-z0-9/])
RewriteRule ^(.*)$ /index.php [L]
RewriteCond $1 !^(index\.php|styles|scripts|img|images|logo|news_images|robots.txt|system|user_guid
)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond $1 !^([a-zA-z0-9/])
RewriteRule ^(.*)$ /index.php [L]
RewriteCond $1 !^(index\.php|styles|scripts|img|images|logo|news_images|robots.txt|system|user_guid
)
RewriteRule ^(.*)$ /index.php/$1 [L]
I ten plik działa dobrze na jednym hostingu, natomiast na localhoscie i na sisco nie.
Chodzi mi o usunięcie index.php z adresu by wyglądał tak:
http://example.org/modul
a nie tak:
http://example.org/index.php/modul
--- EDIT 07.11.2007 ---
Znalazłem czas i rozwiązałem problem, a raczej znalazłem w dokumentacji do framewroka opartego na CI - Kohana. Może komuś się przyda:
CODE
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]