hj_545 发表于 2009-12-4 07:00:42

终于弄好了,原来是少了一个/
RewriteRule ^(.*)$ /index.php/$1
我的是
RewriteRule ^(.*)$ /myphp/ci/index.php/$1
写成
RewriteRule ^(.*)$ myphp/ci/index.php/$1
这样就出错了,呵呵!

z445619791 发表于 2010-1-22 16:54:49

:L
偶 配置了半天 发现http://man.chinaunix.net/newsoft/Apache2.2_chinese_manual/howto/htaccess.html这篇文章后毅然坚持原装的:lol

bubuto 发表于 2010-1-25 01:10:29

呵呵带着更有个性

a123123 发表于 2010-2-17 21:09:17

其实最主要的目的还是为了SEO,不知道前面有个index.php会不会对SEO有影响?

jimboy 发表于 2010-4-10 20:06:13

我的好用了

yz9yz9 发表于 2010-4-30 12:07:16

感觉怪怪的

kevinstudio 发表于 2010-5-7 11:38:24

留脚印!以后会用到的吧

matchbox 发表于 2010-5-21 21:20:52

本帖最后由 matchbox 于 2010-5-21 21:32 编辑

<Directory "E:/xampp/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks Includes ExecCGI
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All
    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all
</Directory>
这是Apache里面的配置,也有那个模块LoadModule rewrite_module modules/mod_rewrite.so了
RewriteEngine on   
RewriteCond $1 !^(index\.php|images|robots\.txt)   
RewriteRule ^(.*)$ /index.php/$1
这是我保存在根目录下的htaccess.htaccess
也吧config里面的index.php去掉了
怎么我的还是没用?有知道为什么的没?

Hex 发表于 2010-5-21 22:41:19

回复 48# matchbox


    应该保存成 .htaccess 吧。

matchbox 发表于 2010-5-22 08:33:44

回复 49# Hex


    保存不了,提示“必须键入文件名”
页: 1 2 3 4 [5] 6 7 8 9 10 11 12 13
查看完整版本: 去掉 URL 中的 index.php