如何在Godaddy.com中使用Codeigniter删除index.php

编程入门 行业动态 更新时间:2024-10-13 20:16:17
本文介绍了如何在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

本文发布于:2023-11-02 03:53:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551294.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   Godaddy   Codeigniter   index   php

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!