Php 为什么.htacess在服务器升级后没有加载我的站点?

Php 为什么.htacess在服务器升级后没有加载我的站点?,php,.htaccess,Php,.htaccess,我在一个由php和smarty Templete引擎开发的网站上工作。在服务器更新之前,一切都很好。 将服务器迁移到5.4后,firebug在我访问该站点时显示以下错误 “网络错误:500内部服务器错误-” 我已经检查了我的服务器错误日志文件,下面显示了一些php警告: Illegal string offset 'file_name' in /home/username/public_html/common/configs/config_redirecturl.inc.php on l

我在一个由php和smarty Templete引擎开发的网站上工作。在服务器更新之前,一切都很好。
将服务器迁移到5.4后,firebug在我访问该站点时显示以下错误

“网络错误:500内部服务器错误-”

我已经检查了我的服务器错误日志文件,下面显示了一些php警告:

    Illegal string offset 'file_name' in /home/username/public_html/common/configs/config_redirecturl.inc.php on line 79
   Illegal string offset 'normal' in /home/username/public_html/common/configs/config_redirecturl.inc.php on line 85
Illegal string offset 'htaccess' in /home/username/public_html/common/configs/config_redirecturl.inc.php on line 91
   Illegal string offset 'file_name' in /home/smart/public_html/common/configs/config_redirecturl.inc.php on line 79
   Illegal string offset 'normal' in /home/username/public_html/common/configs/config_redirecturl.inc.php on line 85
Illegal string offset 'htaccess' in /home/username/public_html/common/configs/config_redirecturl.inc.php on line 91
Illegal string offset 'file_name' in /home/username/public_html/common/configs/config_redirecturl.inc.php on line 79
Illegal string offset 'normal' in `enter code here`/home/username/public_html/common/configs/config_redirecturl.inc.php on line 85
Illegal string offset 'htaccess' in /home/username/public_html/common/configs/config_redirecturl.inc.php on line 91`enter code here`
<
<pre>
RewriteEngine on
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
    FileETag None
    <IfModule mod_headers.c>
    Header unset ETag
    Header set Cache-Control "max-age=31536000, Public"
    </IfModule>
</FilesMatch>
Options -Indexes
RewriteCond   %{REQUEST_FILENAME}  !-f
RewriteRule ^(.+).html$ $1/?%{QUERY_STRING}
RewriteRule ^login/$ login.php
RewriteRule ^logincheck/$ loginCheck.php
RewriteRule ^adminlogin/$ adminLogin.php
RewriteRule ^logout/$ logout.php
RewriteRule ^devlogin/$ devLogin.php
RewriteRule ^signup/$ signup.php
RewriteRule ^forgotpassword/$ forgotPassword.php
RewriteRule ^contactus/$ contactUs.php
RewriteRule ^maintenance/$ maintenance.php
RewriteRule ^verify/$ verifyMail.php?%{QUERY_STRING}
RewriteRule ^help/([^\/]+)/$ helpPage.php?help=$1&%{QUERY_STRING}
RewriteRule ^help/$ helpPage.php?%{QUERY_STRING}
RewriteRule ^static/([^\/]+)/$ staticPage.php?pg=$1&%{QUERY_STRING}
RewriteRule ^verifypasswordmail/$ verifyPasswordMail.php
RewriteRule ^editprofile/$ editProfile.php4/27/2010
RewriteRule ^rssfeeds/([^\/]+)/$ rssFeeds.php?act=$1&%{QUERY_STRING}
#-------Others---------
RewriteRule ^activity/$ activity.php?&%{QUERY_STRING}
#-------flippa urls---------
RewriteRule ^index/$ flips/index.php

RewriteRule ^index/([^\/]+)/$ flips/index.php?list=$1&%{QUERY_STRING}
RewriteRule ^sell/$ flips/addListing.php?action=add&%{QUERY_STRING}

RewriteRule ^edit/([^\/]+)/$ flips/addListing.php?action=edit&list_id=$1&%{QUERY_STRING}



#RewriteRule ^listing/([^\/]+)/([^\/]+)/([^\/]+)/$ flips/listing.php?list=$1&sortby=$2&sortdir=$3&%{QUERY_STRING}

RewriteRule ^listing/([^\/]+)/([^\/]+)/$ flips/listing.php?list=$1&filter_id=$2&%{QUERY_STRING}

RewriteRule ^listing/([^\/]+)/$ flips/listing.php?list=$1&%{QUERY_STRING}

RewriteRule ^viewlist/([^\/]+)/([^\/]+)/([^\/]+)/$ flips/viewList.php?title=$1&act=$2&comment_id=$3&%{QUERY_STRING}

RewriteRule ^viewlist/([^\/]+)/([^\/]+)/$ flips/viewList.php?title=$1&act=$2&%{QUERY_STRING}

RewriteRule ^viewlist/([^\/]+)/$ flips/viewList.php?title=$1&%{QUERY_STRING}
RewriteRule ^golist/([^\/]+)/$ flips/goViewList.php?list_id=$1&%{QUERY_STRING}

RewriteRule ^reporting/([^\/]+)/([^\/]+)/([^\/]+)/$ flips/reporting.php?type=$1&id=$2&title=$3&%{QUERY_STRING}

RewriteRule ^custom-search/$ flips/saveSearch.php

RewriteRule ^watchlist/$ flips/watchlist.php

RewriteRule ^watchseller/([^\/]+)/([^\/]+)/$ flips/watchlistSeller.php?act=$1&seller=$2&%{QUERY_STRING}

RewriteRule ^watchseller/$ flips/watchlistSeller.php

RewriteRule ^watchtag/$ flips/watchlistTag.php

RewriteRule ^mybids/$ flips/myBids.php

RewriteRule ^myoffers/$ flips/myOffers.php

RewriteRule ^mylistings/$ flips/myListings.php

RewriteRule ^sale-completion-area/$ flips/saleMessages.php

RewriteRule ^invoice/([^\/]+)/$ flips/invoice.php?type=$1&%{QUERY_STRING}

RewriteRule ^transaction/([^\/]+)/$ flips/transaction.php?invoice=$1&%{QUERY_STRING}

RewriteRule ^trust/([^\/]+)/$ flips/trustManager.php?user=$1&%{QUERY_STRING}

RewriteRule ^trustprofile/$ flips/trustManagerProfile.php?&%{QUERY_STRING}

RewriteRule ^trustphone/$ flips/phoneVerification.php?&%{QUERY_STRING}

RewriteRule ^placebid/([^\/]+)/$ flips/placeBid.php?title=$1&%{QUERY_STRING}

RewriteRule ^buyitnow/([^\/]+)/$ flips/buyitNow.php?title=$1&%{QUERY_STRING}

RewriteRule ^placeoffer/([^\/]+)/$ flips/placeOffer.php?title=$1&%{QUERY_STRING}

RewriteRule ^attachment/([^\/]+)/$ flips/addAttachment.php?title=$1&%{QUERY_STRING}

RewriteRule ^screenshot/([^\/]+)/$ flips/addScreenShot.php?title=$1&%{QUERY_STRING}

RewriteRule ^analytics/([^\/]+)/$ flips/addAnalyticsStats.php?title=$1&%{QUERY_STRING}

RewriteRule ^purchaseupgrades/([^\/]+)/$ flips/purchaseUpgrades.php?title=$1&%{QUERY_STRING}

RewriteRule ^sale-completion/([^\/]+)/$ flips/saleCompletion.php?title=$1&%{QUERY_STRING}

RewriteRule ^escrow/([^\/]+)/$ flips/startEscrow.php?title=$1&%{QUERY_STRING}

RewriteRule ^dispute/([^\/]+)/$ flips/dispute.php?title=$1&%{QUERY_STRING}

RewriteRule ^feedback/([^\/]+)/$ flips/feedback.php?title=$1&%{QUERY_STRING}

RewriteRule ^feedback-for/([^\/]+)/$ flips/feedbackView.php?act=for&user=$1&%{QUERY_STRING}

RewriteRule ^feedback-left/([^\/]+)/$ flips/feedbackView.php?act=left&user=$1&%{QUERY_STRING}

RewriteRule ^paymentsuccess/$ flips/paymentSuccess.php?%{QUERY_STRING}

RewriteRule ^paymentSuccessVogue/$ flips/paymentSuccessVogue.php?%{QUERY_STRING}

RewriteRule ^verifysite/([^\/]+)/$ flips/verifySite.php?title=$1&%{QUERY_STRING}

RewriteRule ^verifydomain/([^\/]+)/$ flips/verifyDomain.php?title=$1&%{QUERY_STRING}

RewriteRule ^due-diligence/([^\/]+)/$ flips/dueDiligence.php?title=$1&%{QUERY_STRING}

RewriteRule ^view-copies/([^\/]+)/$ flips/viewCopies.php?title=$1&%{QUERY_STRING}

RewriteRule ^invoices/pay/$ flips/invoicePaymentSuccess.php

RewriteRule ^relistpaymentsuccess/$ flips/relistPaymentSuccess.php?%{QUERY_STRING}

RewriteRule ^credits/buy/$ flips/buyCredits.php

RewriteRule ^credits/gateways/$ flips/getPaymentGateways.php?%{QUERY_STRING}

RewriteRule ^credits/withdraw/$ flips/withdrawCredits.php

RewriteRule ^credits/withdrawgateways/$ flips/withdrawgateways.php?%{QUERY_STRING}

RewriteRule ^withdraw/status/view/$ flips/withdrawStatusList.php

RewriteRule ^success-fee/pay/([^\/]+)/$ flips/successFeePayment.php?title=$1&%{QUERY_STRING}

RewriteRule ^blog/$ flips/blogs.php?%{QUERY_STRING}

RewriteRule ^blogcomment/(.+)/$ flips/blogComment.php?title=$1&%{QUERY_STRING}

RewriteRule ^pricing/$ flips/pricing.php

RewriteRule ^tags/([^\/]+)/([^\/]+)/$ flips/tags.php?act=$1&tag_name=$2&%{QUERY_STRING}

RewriteRule ^tags/$ flips/tags.php?%{QUERY_STRING}

RewriteRule ^siteview/([^\/]+)/$ flips/siteView.php?title=$1&%{QUERY_STRING}

RewriteRule ^whoisdomain/([^\/]+)/$ flips/whoIsDomain.php?title=$1&%{QUERY_STRING}
#-------Mail---------

RewriteRule ^mail/compose/$ flips/mailCompose.php

RewriteRule ^mail/inbox/$ flips/mail.php?folder=inbox&%{QUERY_STRING}

RewriteRule ^mail/sent/$ flips/mail.php?folder=sent&%{QUERY_STRING}

RewriteRule ^mail/saved/$ flips/mail.php?folder=saved&%{QUERY_STRING}

RewriteRule ^mail/trash/$ flips/mail.php?folder=trash&%{QUERY_STRING}

RewriteRule ^mail/request/$ flips/mail.php?folder=request&%{QUERY_STRING}

RewriteRule ^mail/sale/$ flips/mail.php?folder=sale&%{QUERY_STRING}

RewriteRule ^readmail/inbox/$ flips/mailRead.php?folder=inbox&%{QUERY_STRING}

RewriteRule ^readmail/sent/$ flips/mailRead.php?folder=sent&%{QUERY_STRING}

RewriteRule ^readmail/saved/$ flips/mailRead.php?folder=saved&%{QUERY_STRING}

RewriteRule ^readmail/trash/$ flips/mailRead.php?folder=trash&%{QUERY_STRING}

RewriteRule ^readmail/request/$ flips/mailRead.php?folder=request&%{QUERY_STRING}

RewriteRule ^readmail/sale/$ flips/mailRead.php?folder=sale&%{QUERY_STRING}

RewriteRule ^selectuser/$ selectUsernames.php

#-------Members---------

RewriteRule ^profile/basic/$ flips/profileBasic.php?%{QUERY_STRING}

RewriteRule ^profile/avatar/$ flips/profileAvatar.php?%{QUERY_STRING}

RewriteRule ^profile/personal/$ profilePersonal.php?%{QUERY_STRING}

RewriteRule ^profile/info/([^/\.]+)/([^/\.]+)/?$ profileInfo.php?id=$1&pg=$2&%{QUERY_STRING}

RewriteRule ^profile/password/$ flips/profilePassword.php?%{QUERY_STRING}



RewriteRule ^profile/background/$ profileBackground.php?%{QUERY_STRING}



RewriteRule ^myprofile/$ myProfile.php?%{QUERY_STRING}



RewriteRule ^profilecomments/$ profileComments.php?%{QUERY_STRING}



RewriteRule ^notificationsettings/$ flips/notificationSettings.php?%{QUERY_STRING}



RewriteRule ^editlisting/([^\/]+)/$ flips/editListing.php?title=$1&%{QUERY_STRING}



RewriteRule ^promote/([^\/]+)/$ flips/promoteList.php?title=$1&%{QUERY_STRING}



RewriteRule ^endauction/([^\/]+)/$ flips/endAuction.php?title=$1&%{QUERY_STRING}



RewriteRule ^welcome/$ flips/welcome.php



#------- Site Restricted -----------



RewriteRule ^siteRestricted/$ siteRestricted.php?&%{QUERY_STRING}

RewriteRule ^(support) - [L]

#------ should be last

RewriteRule  ^([^/\.]+)$ flips/profileOverview.php?user=$1&%{QUERY_STRING}

RewriteRule  ^([^/\.]+)/$ flips/profileOverview.php?user=$1&%{QUERY_STRING}


#------Js-----

RewriteCond   %{REQUEST_FILENAME}  !-f

你知道如何解决这些问题吗?

我错了。我应该把它放在哪里?我现在应该怎么做才能在我的服务器上运行我的站点呢?感谢您根据您看到的错误所做的回复,问题不在
.htaccess
中,而是在
config\u redirecturl.inc.php
中。如果您在帖子中包含了
config_redirecturl.inc.php
的内容,可能有人可以帮助您。您需要检查Apache error.log文件而不是php error文件,原因是500个错误。我已经更新了代码,请您查看一下config_redirecturl.inc代码的please@Jory Geerts。Thanks@anubhava----我还检查了apache错误日志,它显示一些文件丢失了,比如favicon.ico、robots.txt和devLogin.php。我应该把所有这些文件都放进去吗?
 /**
 * settings for $CFG
 *
 * ..
 *
 * PHP version 5.0
 *
 * @category    ..
 * @package     ..
 * @author      selvaraj_47ag04
 * @copyright   Copyright (c) 2008 {@link http://www.agriya.com Agriya Infoway}
 * @license     http://www.agriya.com Agriya Infoway Licence
 * @version     SVN: $Id: config_redirecturl.inc.php 534 2008-04-29 07:42:15Z guruprasad_20ag08 $
 * @since       2008-04-02
 * @filesource
 **/
/**
 * @var             string show login url name
 * @cfg_label       Login url filename
 * @cfg_key         is_login_url_name
 * @cfg_sec_name    login Details
 * @cfg_section     redirecturl_settings
 */
$CFG['auth']['login_url']['file_name'] = 'login';
/**
 * @var             string show login normal
 * @cfg_label       Login url normal
 * @cfg_key         is_login_url_normal
 */
$CFG['auth']['login_url']['normal'] = '';
/**
 * @var             string show login htaccess
 * @cfg_label       Login url htaccess
 * @cfg_key         is_login_url_htaccess
 */
$CFG['auth']['login_url']['htaccess'] = '';
/**
 * @var             string show members url name
 * @cfg_label       Members url filename
 * @cfg_key         is_members_url_normal
 */
$CFG['auth']['members_url']['file_name'] = 'index';
/**
 * @var             string show members normal
 * @cfg_label       Members url normal
 * @cfg_key         is_login_url_members
 */
$CFG['auth']['members_url']['normal'] = '';
/**
 * @var             string show members htaccess
 * @cfg_label       Members url htaccess
 * @cfg_key         is_login_url_htaccess
 */
$CFG['auth']['members_url']['htaccess'] = '';
/**
 * @var             string show first visit url name
 * @cfg_label       First visit url filename
 * @cfg_key         is_first_visit_url
 */
$CFG['auth']['first_visit_url']['file_name'] = 'index';
/**
 * @var             string show first visit normal
 * @cfg_label       First visit url normal
 * @cfg_key         is_first_visit_normal
 */
$CFG['auth']['first_visit_url']['normal'] = '';
/**
 * @var             string show first visit htaccess
 * @cfg_label       First visit url htaccess
 * @cfg_key         is_first_visit_htaccess
 */
$CFG['auth']['first_visit_url']['htaccess'] = '';
/**
 * @var             string show dsabled module url name
 * @cfg_label       Disabled module url filename
 * @cfg_key         is_dsabled_module_url
 */
$CFG['redirect']['dsabled_module_url']['file_name'] = 'index';
/**
 * @var             string show dsabled module url normal
 * @cfg_label       Disabled module url normal
 * @cfg_key         is_dsabled_module_url_normal
 */
$CFG['redirect']['dsabled_module_url']['normal'] = '';
/**
 * @var             string show dsabled module url htaccess
 * @cfg_label       Disabled module url htaccess
 * @cfg_key         is_dsabled_module_url_htaccess
 */
$CFG['redirect']['dsabled_module_url']['htaccess'] = '';
/**
 * @var             string show maintenance module url name
 * @cfg_label       Maintenance module url filename
 * @cfg_key         is_maintenance_module_url
 */
$CFG['redirect']['maintenance_module_url']['file_name'] = 'maintenance';
/**
 * @var             string show maintenance module url normal
 * @cfg_label       Maintenance module url normal
 * @cfg_key         is_maintenance_module_url_normal
 */
$CFG['redirect']['maintenance_module_url']['normal'] = '';
/**
 * @var             string show maintenance module url htaccess
 * @cfg_label       Maintenance module url htaccess
 * @cfg_key         is_maintenance_module_url_htaccess
 */
$CFG['redirect']['maintenance_module_url']['htaccess'] = '';