示例:drupalchina.cn/?q=user ,drupalchina.cn/user,后者就是简洁URL,去掉了“?q=”的URL。简洁URL的好处,SEO。
这里以XAMPP集成安装包为例,介绍如何配置简洁链接:
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>
Ubuntu下开启简洁链接的方法