用户
 找回密码
 入住 CI 中国社区
搜索
查看: 5936|回复: 1
收起左侧

[其它 Other] godaddy 空间的 .htaccess文件

[复制链接]
发表于 2009-7-23 22:15:28 | 显示全部楼层 |阅读模式
原来的.htaccess文件,不知道为什么在godaddy无法使用
  1. RewriteEngine on   
  2. RewriteCond $1 !^(index\.php|images|css|robots\.txt)   
  3. RewriteRule ^(.*)$ /index.php/$1 [L]
复制代码
----------------------------------------------------------------------
以下是正常能用的.htaccess文件。
来源:
http://www.cyphercoretech.com/ar ... 20090604084455-9149
-----------------------------------------------------------------------
  1. #Enable mod rewrite
  2. RewriteEngine On
  3. #the location of the root of your site
  4. #if writing for subdirectories, you would enter /subdirectory
  5. RewriteBase /

  6. #Removes access to CodeIgniter system folder by users.
  7. #Additionally this will allow you to create a System.php controller,
  8. #previously this would not have been possible.
  9. #'system' can be replaced if you have renamed your system folder.
  10. RewriteCond %{REQUEST_URI} ^system.*
  11. RewriteRule ^(.*)$ /index.php?/$1 [L]

  12. #Checks to see if the user is attempting to access a valid file,
  13. #such as an image or css document, if this isn't true it sends the
  14. #request to index.php
  15. RewriteCond %{REQUEST_FILENAME} !-f
  16. RewriteCond %{REQUEST_FILENAME} !-d
  17. #This last condition enables access to the images and css
  18. #folders, and the robots.txt file
  19. #Submitted by Michael Radlmaier (mradlmaier)
  20. # I added this line based on some info from other posts
  21. RewriteCond $1 !^(index\.php|images|robots\.txt|css)

  22. RewriteRule ^(.*)$ index.php?/$1 [L]
复制代码

评分

参与人数 1威望 +5 收起 理由
Hex + 5 精品文章

查看全部评分

发表于 2009-12-24 23:05:28 | 显示全部楼层
感谢啊!!!!!!!!
我上传了我的CI程序上去后,就出现404错误
用了你的.htaccess问题解决

本版积分规则