duanpuchun5275 2013-03-30 01:57
浏览 54
已采纳

ubuntu 12.10上的.htaccess文件设置

as soon as i save these .htaccess file on my server i got a error 500 internal server error, any idea how can i resolve it. the other issue for some reason these .htaccess file works on the tutorial i was watching http://www.youtube.com/watch?feature=player_embedded&v=Aw28-krO7ZM#at=130

<IfModule mod_rewrite.c>
   RewriteEngine On

   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-l

   RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
<IfModule>
  • 写回答

1条回答 默认 最新

  • douqianzha6213 2013-04-01 22:43
    关注

    First error:

    Module mod_rewrite was not enabled in Apache. After you enable it - the error was gone and website start working.

    To enable the module edit apache’s httpd.conf file and make sure this line is there uncommented:

    LoadModule rewrite_module modules/mod_rewrite.so
    

    after installation mod_rewrite on your system.

    Second error:

    Change last line of .htaccess file to:

    </IfModule>
    

    I hope I helped.

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

报告相同问题?

悬赏问题

  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波