我有这个.htaccess文件
RewriteEngine onRewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^/?$ "http\:\/\/jedpanel\.com\/" [R=301,L]
# Use PHP5.4 as default
AddHandler application/x-httpd-php54 .php
# BEGIN WordPress
<IfModulemod_rewrite.c>
RewriteEngine OnRewriteBase
/RewriteRule^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</IfModule>
# END WordPress
但我有一个问题。当我保存它时出错了,格式改变了。我试图解决它,但这就是我得到的。任何人都可以修复它,因为网页提供了500 Internal Server error
。
答案 0 :(得分:0)
立即尝试:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^xinlongboard\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.xinlongboard\.com$
RewriteRule ^/?$ "http\:\/\/jedpanel\.com\/" [R=301,L]
# Use PHP5.4 as default
AddHandler application/x-httpd-php54 .php
# 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
我不太清楚你在做什么来搞乱你的格式。下次只通过您的主机进行编辑,可以防止这种混乱。
答案 1 :(得分:0)
RewriteEngine on
RewriteCond %{HTTP_HOST} ^xinlongboard\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.xinlongboard\.com$
RewriteRule ^/?$ "http\:\/\/jedpanel\.com\/" [R=301,L]
# Use PHP5.4 as default
AddHandler application/x-httpd-php54 .php
# 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
&#13;