xiangkan 发表于 2011-2-18 17:37:35

Godaddy linux 空间 CI 2.0.0 URL问题

用的是Godaddy Linux主机共享空间,按照 http://codeigniter.com/wiki/Godaddy_Installaton_Tips/ 配置
/*********************************************
hank you to everyone who’s posted on Godaddy installation issues.Having just struggled with this issue myself, this seems to be the shortest path to proper performance on Godaddy.This is entirely based on other people’s posts but, I didn’t really see this all in one place so I thought I do just that.In config.php:$config['index_page'] = "index.php?";
$config['uri_protocol'] = "QUERY_STRING";
I’ve successfully implemented this on GoDaddy without using “index.php?” as the index page.This is helpful when using anchor() in the URL helper to create links. Even with htaccess removing the index.php, anchor() will still put in what you have set as an index page.You should now be able to access everything as such:http://yourdomain.com/index.php?controller/action/etc
Once you get to a point where you want to hide the ‘index.php?’ paste this into your .htaccess file:RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1
You should now be able to access everything as such:http://yourdomain.com/controller/action/etc
The .htaccess file must be in Unix LF only style. If you use Notepad or Wordpad and upload an .htaccess file in CR/LF style it won’t work.Hope this is helpful.
***************************************************/
访问成功,但是目前我想要去掉URL中的 ? 号。
但怎么也实现不了 URL 没有问号的形式,请问有人成功的吗?
谢谢!

visvoy 发表于 2011-2-18 20:11:40

据说godaddy不支持去掉问号

benfeng 发表于 2011-2-20 22:29:38

以前版本就有这些问题.
页: [1]
查看完整版本: Godaddy linux 空间 CI 2.0.0 URL问题