XAMMP服务器通过邮寄名称永久链接不起作用

时间:2014-12-26 作者:Pragnesh Chauhan

我可以访问localhost上的主页,但无法访问我添加的页面。显示404错误。

我的问题是:https://stackoverflow.com/questions/12311737/permalinks-is-not-working-in-xampp-localhost-server-on-windows-7但在这里重新发布,因为在该链接中没有发布正确的答案。

httpd.conf SETTINGS

<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>
<小时>
<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
    Options Indexes FollowSymLinks

    #
    # 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>
<小时>

HTACCESS FILE CODE

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /perms/dev/
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /perms/dev/index.php [L]
</IfModule>

# END WordPress
<小时>mod rewrite also enabled

LoadModule rewrite_module modules/mod_rewrite.so

1 个回复
SO网友:fuxia

在里面xampp/apache/conf/httpd.conf, 在动态共享对象(DSO)支持下,启用mod\\u rewrite。取消对行的注释:

LoadModule rewrite_module modules/mod_rewrite.so
然后重启服务器,再次在WordPress中设置永久链接。

结束

相关推荐

包含帖子类型和分类的.htaccess重写规则

我正在尝试重写此url www.domain。com/图库/?大学=伯明翰,以便于搜索引擎优化,如www.domain。com/uni/伯明翰/画廊(?university=birmingham)代表分类法,图库是post类型。目前这个url(www.domain.com/gallery/?university=birmingham)运行良好,它显示了正确的帖子,只是没有成功地将其改写为上面的帖子我尝试过这样做(应该可以):RewriteEngine On RewriteRule ^uni/([0