全球主机交流论坛

标题: 请教个wordpress伪静态htaccess问题 [打印本页]

作者: fifalan    时间: 2021-1-8 12:01
标题: 请教个wordpress伪静态htaccess问题
本帖最后由 fifalan 于 2021-1-8 12:35 编辑

我想自定义wordpress的404伪静态htaccess定义,非原版的wordpress .htaccess
  1. # BEGIN WordPress
  2. ErrorDocument 404 /404.html
  3. RewriteEngine On
  4. RewriteBase /
  5. RewriteRule ^archives/.*$ /index.php [L]
  6. RewriteRule ^feed.*$ /index.php [L]
  7. RewriteRule ^page/.*$ /index.php [L]
  8. RewriteCond %{REQUEST_FILENAME} !-f
  9. RewriteCond %{REQUEST_FILENAME} !-d
  10. # END WordPress
复制代码

其中RewriteRule ^archives/.*$ /index.php [L] 这个archives我怎么改成变量URL呢

比如:/manhua/123456.html     /xiaoshuo/123456.html,用上面的伪静态,怎么修改archives

不知道哪个大佬知道,菜鸟懵逼中
作者: googlebot2    时间: 2021-1-8 12:06
在wp的plugin里改htm
作者: hdwz88    时间: 2021-1-8 12:07
固定连接哪里有 不用改伪静态 直接用就可以
作者: 朔朔    时间: 2021-1-8 12:10
https://你的域名/wp-admin/options-permalink.php
作者: fifalan    时间: 2021-1-8 12:28
hdwz88 发表于 2021-1-8 12:07
固定连接哪里有 不用改伪静态 直接用就可以

原版的伪静态不能自定义404错误页的
作者: fifalan    时间: 2021-1-8 12:30
朔朔 发表于 2021-1-8 12:10
https://你的域名/wp-admin/options-permalink.php

大佬  可以详细点么  打开文件一脸懵逼
作者: 小旭    时间: 2021-1-8 12:34
fifalan 发表于 2021-1-8 12:30
大佬  可以详细点么  打开文件一脸懵逼

给你路径了 你去看看就知道了
作者: fifalan    时间: 2021-1-8 12:36
小旭 发表于 2021-1-8 12:34
给你路径了 你去看看就知道了

我是想修改上面 htaccess 中的 archives 改为变量 ,不知道是不是我说的不清楚
作者: 小旭    时间: 2021-1-8 12:37
fifalan 发表于 2021-1-8 12:36
我是想修改上面 htaccess 中的 archives 改为变量 ,不知道是不是我说的不清楚 ...

你要找变量代码
作者: fifalan    时间: 2021-1-8 12:41
小旭 发表于 2021-1-8 12:37
你要找变量代码

哦,我找找看  菜鸟不是太懂这些,谢谢你
作者: fifalan    时间: 2021-1-8 12:44
小旭 发表于 2021-1-8 12:37
你要找变量代码

        'category' => __( '%s (Category slug. Nested sub-categories appear as nested directories in the URL.)' ), 找到这个貌似是变量  但是在 htaccess 里不知道怎么写,大佬知道么




欢迎光临 全球主机交流论坛 (https://sunk.eu.org/) Powered by Discuz! X3.4