http://localhost/my/INDEX.PHP/INDEX/INDEX无法正常运行:解决时找不到Options FollowSymLinks谢谢

来源:2-3 路由类

qq_彩_0

2018-09-16 11:40

https://img.mukewang.com/5b9dcfc50001e1c706580509.jpg

打不到:

Options FollowSymLinks

https://img2.mukewang.com/5b9dd0590001632b07010331.jpg

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

</IfModeule>


Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.

Error 500

localhost

Apache/2.4.18 (Win32) PHP/5.6.16


写回答 关注

4回答

  • BadReborn
    2020-02-01 16:14:31

    谢谢,同样的问题

  • qq_彩_0
    2018-09-16 17:11:40

    通过了,不知道是否是这样

  • qq_彩_0
    2018-09-16 17:10:17

    再将RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]修改为:

    RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]


  • qq_彩_0
    2018-09-16 17:01:30

    终于解决了:phpstudy或者xampp都可以,版本差不多;

    1、在Apache安装文件夹conf里找到httpd.conf文件搜索并开启LoadModule rewrite_module modules/mod_rewrite.so。搜索AllowOverride None 修改为AllowOverride All

    2、

    <IfModule mod_rewrite.c>

         Options +FollowSymlinks -Multiviews

         RewriteEngine On

         RewriteCond %{REQUEST_FILENAME} !-d

         RewriteCond %{REQUEST_FILENAME} !-f

         RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

    </IfModule>

        

    最好重启一下!


从零开始打造自己的PHP框架

和我一起开发一套属于自己的PHP框架,自己开发的才是最好用的

48187 学习 · 162 问题

查看课程

相似问题