「教程」301 相关集中贴

超级版主 沉冰浮水 2018-6-27 9111

伪静态设置助手 - Z-Blog 应用中心

https://app.zblogcn.com/?id=16338

强制目录链接统一以斜线结尾【301】-Z-BlogPHP-ZBlogger技术交流中心

https://bbs.zblogcn.com/thread-94926.html

-----

Apache + .htaccess默认规则

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

# 所有自定义规则加在这一行起,各种用途的规则视情况有顺序要求

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

一些通用需求规则,按自己需要添加

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

#强制目录以斜线/结尾

RewriteRule ^([^\.]+[^/])$ https://%{http_host}/$1/ [L,R=301]

#域名统一

RewriteCond %{http_host} !^www.zblogcn.com$ [NC]

RewriteRule ^(.*)$ https://www.zblogcn.com/$1 [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

「QQ群:我的咸鱼心」「「水坑」系列教程索引
我大概率能够解决你实际面临的问题(收费),只是”你提出的问题“要如何回答则可能是另一个问题。

最后于 2022-5-18 被沉冰浮水编辑 ,原因:
返回