Apache mengkonfigurasi penulisan semula untuk menyembunyikan index.php thinkphp
迷茫
迷茫 2017-05-24 11:33:27
0
3
836

Apache mengkonfigurasi penulisan semula untuk menyembunyikan index.php thinkphp
Saya mendayakan modul tulis semula

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>

Ada apa?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

membalas semua(3)
给我你的怀抱

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

Ty80

Terima kasih atas jemputan!

Sembunyikan index.php, anda harus mengkonfigurasi fail .htaccess di bawah e:/wamp64/www/golorryService

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

Dan anda perlu mengesahkan sama ada httpd.conf apache anda (di bawah direktori apache/conf) memuatkan modul mod_rewrite.so

    LoadModule rewrite_module modules/mod_rewrite.so

    
phpcn_u1582

Artikel ini boleh merujuk kepada beberapa konfigurasi Apache

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan