.htaccess Rewriting CodeIgniter URLs on Apache 2.4 and mod_fastcgi_handler (FCGI)
CodeIgniter had some problems with mod_rewrite on a shared hosting account where the hoster runsApache + FCGI
When you tried to use CI’s SEO URLs, you'll get an error 'No input file specified'.
And the solution here:
Create an
.htaccess
file in the same directory with index.php
and paste into it: RewriteEngine On
# Existing files and directories remain accessible
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.* - [L]
# Redirect the rest
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [QSA,L]
Other solution :
Create a customized PHP.INI file under the root directory of your site with the following line.
cgi.fix_pathinfo = 0;
Không có nhận xét nào:
Đăng nhận xét