我必须提供一些有关我的网站环境的信息
我的根目录中有静态网页。
WordPress 安装在子词典 www.domain.com/blog/ 中
我有两个 .htaccess ,一个在根目录中,一个在 wordpress 文件夹中。
我想要
一些例子
域名.tld/index.html >> 域名.tld/
域名.tld/file.html >> 域名.tld/file/
域名.tld/file.html/ >> 域名.tld/file/
域名.tld/wordpress/post-name >> 域名.tld/wordpress/post-name/
我在 ROOT htaccess 中的代码是
<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
#removing trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ $1 …Run Code Online (Sandbox Code Playgroud)