我的域(example.com
)指向public_html/cushbu
它包含一個WordPress項目的WordPress:更改URL
所以我在wp-config
文件中.htaccess
更改的設置
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
而且pubic_html/cushbu
文件夾
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /example.com
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /example.com/index.php [L]
</IfModule>
# END WordPress
# Wordfence WAF
<Files ".user.ini">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>
</Files>
# END Wordfence WAF
#disable hotlinking of images with forbidden or custom image option
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]
下的文件多數民衆贊成訪問我的域名(0時,我得到500錯誤)
變化RewriteBase /example.com到RewriteBase/cushbu –
也改變重寫規則/cushbu/index.php [L] –
NOP仍在相同的錯誤 – Jabaa