【问题标题】:WordPress single page rewrite rule / Adding custom page slugWordPress 单页重写规则/添加自定义页面 slug
【发布时间】:2017-02-10 19:43:27
【问题描述】:

我想更改此页面:

mysite.com/?ct_additional_features=hilltop&search-listings=true

看起来像这样:

mysite.com/test

以下是我在htaccess 中添加的内容:(高于 WP 主要重写规则)

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^test/(.*) index.php/?ct_additional_features=hilltop&search-listings=true [L]
</IfModule>

【问题讨论】:

    标签: wordpress .htaccess mod-rewrite slug


    【解决方案1】:

    在您的 .htaccess 中使用它:

    RewriteEngine On
    RewriteRule ^test$ /?ct_additional_features=hilltop&search-listings=true [L]
    

    它会给你留下mysite.com/test

    【讨论】:

    • 它现在可以工作了,但是页面标题仍然显示默认的 401“Nothing found ...”。知道我该如何改变它吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-01-27
    • 1970-01-01
    • 1970-01-01
    • 2017-08-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多