2016-10-19 31 views
0

我在使用Yoast SEO插件我網站的.htaccess文件插入圖像到期代碼導致整個網站顯示內部服務器錯誤500Upadting使用Yoast SEO插件我的.htaccess文件停止我的wordpress網站

現有updateing .htaccess文件前,代碼爲:

# 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 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 
 

 
<If Modulemod_expires.c> 
 
# Enable expirations 
 
ExpiresActive On 
 
# Default directive 
 
ExpiresDefault "access plus 1 month" 
 
# My favicon 
 
ExpiresByType image/x-icon "access plus 1 year" 
 
# Images 
 
ExpiresByType image/gif "access plus 1 month" 
 
ExpiresByType image/png "access plus 1 month" 
 
ExpiresByType image/jpg "access plus 1 month" 
 
ExpiresByType image/jpeg "access plus 1 month" 
 
# CSS 
 
ExpiresByType text/css "access plus 1 month" 
 
# Javascript 
 
ExpiresByType application/javascript "access plus 1 year" 
 
</IfModule>

  1. 是否起因於在該行沒有提供空間或使用它兩次。
  2. .htaccess文件未顯示更新的代碼。
  3. 管理控制檯停止工作。
  4. 通過ftp面板更新不能解決問題。
  5. 取消激活插件也不起作用。 我的網站是securedoc.org

回答

0

具體的.htaccess規則與Yoast無關,所以你如何建立兩者之間的關係?儘管在你的IF命令中有一個錯誤。

<IfModule mod_expires.c>

你在那裏缺少空間。

相關問題