本文介绍了如何在Godaddy中使用Codeigniter删除index.php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用codeigniter构建了一个网站,当我将其上传时,它给我该错误在此服务器上找不到所需的文档.我知道问题出在我的.htaccess代码上.有人可以帮助我吗?
i built a website with codeigniter and when i uploaded it it give me that error The requested document was not found on this server. i know that the problem is with my .htaccess code. so anyone can help me?
RewriteEngine on RewriteCond $1 !^(index\.php|css|js|robots\.txt|images|itempics) RewriteRule ^(.*)$ /index.php/$1 [L] 推荐答案在一个共享主机上,我对此进行了设置:
On one shared hosting I have this set:
RewriteEngine on RewriteBase / Options -Indexes RewriteCond $1 !^(index\.php|robots\.txt|assets) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/\?$1 [L]也是
/* |-------------------------------------------------------------------------- | Base Site URL |-------------------------------------------------------------------------- | | URL to your CodeIgniter root. Typically this will be your base URL, | WITH a trailing slash: | | example/ | | If this is not set then CodeIgniter will guess the protocol, domain and | path to your installation. | */ $config['base_url'] = 'example.tld/'; /* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = '';更多推荐
如何在Godaddy.com中使用Codeigniter删除index.php
发布评论