zoukankan      html  css  js  c++  java
  • [Drupal] .htaccess issue

    When I insert a wrong url to the server, I got the error as blow :

     

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, administrateur@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    And then I check the log of apache, I got some notice :

    Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

    Thanks for Google, I got the resolve.

    Open the .htaccess files, we can get some code as below :

    RewriteBase /example
    RewriteCond
    %{REQUEST_FILENAME} !-f
    RewriteCond
    %{REQUEST_FILENAME} !-d
    RewriteCond
    %{REQUEST_URI} !=/favicon.ico
    RewriteRule ^(.
    *)$ index.php?q=$1 [L,QSA]

    Because the website is running in a subdirectory of the server ( or maybe in a VirtualDocumentRoot and the rewrite rules are not working properly),  after I modify the .htaccess file, I fix the error. Here is the code :

    代码
    RewriteBase /example
    RewriteCond
    %{REQUEST_FILENAME} !-f
    RewriteCond
    %{REQUEST_FILENAME} !-d
    RewriteCond
    %{REQUEST_URI} !=/favicon.ico
    RewriteRule ^(.
    *)$ /index.php?q=$1 [L,QSA] #add a slash in front of index.php?
  • 相关阅读:
    用U3D寻找看电视的感觉!!
    MipMap
    什么是 A 轮融资?有 B轮 C轮么?
    Java写的斗地主游戏源码
    sqlserver sp_spaceused用法
    SQL中的全局变量和局部变量(@@/@)
    SQL2008数据库导出到SQL2000全部步骤过程
    生成Insert语句的存储过程
    物理机连接虚拟机数据库
    配置sql server 2000以允许远程访问
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/1814802.html
Copyright © 2011-2022 走看看