suchen

Heim  >  Fragen und Antworten  >  Hauptteil

Apache konfiguriert Rewrite, um die index.php von thinkphp auszublenden

Apache konfiguriert Rewrite, um die index.php von thinkphp auszublenden?
Ich habe das Rewrite-Modul aktiviert

Listen 8888

<Directory />
    AllowOverride all
    Require all denied
</Directory>

<Directory "E:/wamp64/www/">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options All

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #

#   onlineoffline tag - don't remove
    Require local
</Directory>

<VirtualHost *:8888>  
    #配置访问跟目录  
    DocumentRoot "e:/wamp64/www/golorryService"  
    ServerName http://127.0.0.1:8888
</VirtualHost>

Was ist los?

迷茫迷茫2785 Tage vor870

Antworte allen(3)Ich werde antworten

  • 给我你的怀抱

    给我你的怀抱2017-05-24 11:35:27

    http://doc.thinkphp.cn/mobile...

    Antwort
    0
  • PHP中文网

    PHP中文网2017-05-24 11:35:27

    谢邀!

    隐藏index.php,应该在你的e:/wamp64/www/golorryService下配置 .htaccess文件

        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
        

    并且你要确认你的apache的httpd.conf(apache/conf目录下)是否加载 mod_rewrite.so模块

        LoadModule rewrite_module modules/mod_rewrite.so
    
        

    Antwort
    0
  • phpcn_u1582

    phpcn_u15822017-05-24 11:35:27

    这篇文章可以参考参考 Apache的部分配置

    Antwort
    0
  • StornierenAntwort