apache_conf 如何在Root中添加非WordPress子目录

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf 如何在Root中添加非WordPress子目录相关的知识,希望对你有一定的参考价值。

In order to prevent WordPress from redirecting the subdirectory (and loading the 404 template), you must add a rule to the .htaccess file, BELOW the WordPress rewrite rules, with a line for each subdirectory, like so:

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

# BEGIN Subdirectories
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/subdirectoryname1/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/subdirectoryname2/(.*)$ [OR]
RewriteRule ^.*$ - [L]
</IfModule>
# END Subdirectories

以上是关于apache_conf 如何在Root中添加非WordPress子目录的主要内容,如果未能解决你的问题,请参考以下文章

apache_conf 如何在Root中添加非WordPress子目录

apache_conf 密码保护目录(将两个文件保存到root)https://www.zigpress.com/2014/09/22/password-protecting-an-entire-wo

apache_conf 从root重定向到subdir

apache_conf Denegar el acceso是一名非导演

如何在 Expect 脚本中发送带有 $ 符号的密码

apache_conf (非WP)HTTPSへリダイレクト处理