关闭

配置简洁URL

标签: urlapache.htaccessmodule
382人阅读 评论(0) 收藏 举报
分类:
示例:domain.com/?q=admin,domain.com/admin,后者就是简洁URL,去掉了“?q=”的URL。简洁URL的好处,SEO。

1、 F:\xampp\apache\conf,在该目录下找到httpd.conf文件,打开,找到#LoadModule rewrite_module modules/mod_rewrite.so。将前面的注释符“#”去掉。
2、把F:\xampp\apache\conf\apache conf里面的AllowOverride None改为了AllowOverride All,试了一下
<Directory "F:/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>



http://bbs.zzbaike.com/thread-25806-1-1.html


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:486324次
    • 积分:5596
    • 等级:
    • 排名:第4682名
    • 原创:75篇
    • 转载:171篇
    • 译文:0篇
    • 评论:26条
    最新评论
    友情链接