dongru2019 2013-10-26 00:28
浏览 80
已采纳

我的htaccess出错了。 怎么了?

The CMS is OK because all works when I use that on localhost (WAMP) but when I uploaded on FTP I see 500 Internal Server Error. What is wrong? I tried to think of everything. I so sorry for my English.

ErrorDocument 400 /error.php
ErrorDocument 401 /error.php
ErrorDocument 403 /error.php
ErrorDocument 404 /error.php
ErrorDocument 500 /error.php
#######################################

Options +FollowSymlinks
Options -Indexes

<Files .htaccess>
deny from all
</Files>

order allow,deny
deny from 65.18.169.227
allow from all

<ifModule mod_php5.c>
    php_value zlib.output_compression 16386
    php_value register_globals off
    php_value session.use_trans_sid 0
    php_value default_charset iso-8859-1
</ifModule>
########################################

<ifModule mod_rewrite>
RewriteEngine on

RewriteRule ^([A-Za-z0-9_-]+)$ profile.php?user_profile=$1
RewriteRule ^widget/(.*)$ ./widget.php?user_widget=$1 [QSA]
RewriteRule ^delete/(.*)$ ./ajax.php?cmd=delete_qa&del_id=$1 [QSA]

RewriteRule ^site/terms ./terms.php
RewriteRule ^site/privacy ./privacy.php
RewriteRule ^ajax/ask ./ajax.php?cmd=ask
RewriteRule ^ajax/checkusername ./ajax.php?cmd=check_name
RewriteRule ^ajax/answer ./ajax.php?cmd=answer_qa
RewriteRule ^account/signup ./signup.php
RewriteRule ^account/login ./login.php
RewriteRule ^account/inbox ./inbox.php
RewriteRule ^account/forgotpassword ./forgotpassword.php
RewriteRule ^account/settings ./account_settings.php
RewriteRule ^account/profile ./account_profile.php
RewriteRule ^account/photo ./account_photo.php
RewriteRule ^account/design ./account_design.php
RewriteRule ^account/widget ./account_widget.php
RewriteRule ^account/disable ./account_disable.php
RewriteRule ^site/disabled ./disabled.php
RewriteRule ^site/error ./error.php
RewriteRule ^search/profiles ./search.php
RewriteRule ^account/logout ./logout.php
RewriteRule ^site/complete ./logout-complete.php
RewriteRule ^site/maintenance ./maintenance.php

#####################################

# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
</ifModule>

<ifModule mod_ssl.c>
#SSLVerifyClient    optional_no_ca
#SSLVerifyDepth 5
#SSLOptions +FakeBasicAuth
#SSLRequireSSL

</ifModule>

This is my logs:

[Sat Oct 26 02:21:55 2013] [alert] [client 178.36.102.110] /home/drolepl/domains/domena.pl/public_html/.htaccess: Invalid command '\xef\xbb\xbfErrorDocument', perhaps misspelled or defined by a module not included in the server 
  • 写回答

1条回答 默认 最新

  • dongsuoying9059 2013-10-26 02:34
    关注

    Your text editor is adding a Unicode byte order mark (BOM), as Jake Worrell pointed out. You should be able to save the file without the BOM by changing a setting in your text editor.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)
  • ¥20 matlab yalmip kkt 双层优化问题
  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入