示例: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
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