2017-04-03 64 views
0

删除的index.php这是我WAMP /网络/的.htaccess如何从笨路径

RewriteEngine on 
RewriteCond $1 !^(index\.php|images|assets|robots\.txt) 
RewriteRule ^(.*)$ /project-name/index.php/$1 [L] 

# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request 
RewriteCond %{REQUEST_METHOD} OPTIONS 
RewriteRule ^(.*)$ $1 [R=200,L] 
**strong text** 

但错误显示 所请求的网址/ CI /公/注册在此服务器上找到。

的Apache/2.4.10(Win64中)PHP/5.5.12 Server将在:: 1端口80 是什么问题..我也从config.php文件删除的index.php ..

+0

的可能的复制取代

$config['uri_protocol'] ="AUTO" 

tp://stackoverflow.com/questions/34714792/htaccess-codeigniter-500-internal-server-error) –

+0

那么现在该怎么办? –

+0

或甚至你可以看到[Codeigniter上的文档](http://stackoverflow.com/documentation/codeigniter/929/getting-started-with-codeigniter/3068/installation-and-setup#t=201704031511502165007) –

回答

1

尝试以下

打开config.php文件,并做以下内容替换

$config['index_page'] = "index.php" 

$config['index_page'] = "" 

在某些情况下,uri_protocol的默认设置无法正常工作。 [ - 500内部服务器错误的.htaccess笨(HT只是

$config['uri_protocol'] = "REQUEST_URI" 

的.htaccess

RewriteEngine on 
RewriteCond $1 !^(index\.php|resources|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 
+0

仍然是相同的错误 –

+0

@MuhammadAhsanAyazKhan尝试在另一个浏览器!这应该工作。 – Bhaskar

+0

注意codeigniter 3版本+没有uri_protocol自动 – user4419336

0

的.htaccess

RewriteEngine on 
RewriteRule ^(.*)$ ./index.php/$1 [L] 
RewriteCond $1 !^(index\.php|resources|robots\.txt) 
+0

同样的问题..你可以加入团队查看器来检查? –

+0

请发送您的项目.htacess代码截图。 – Gaurav