ホームページ  >  記事  >  運用・保守  >  Apacheで擬似静的を有効にする方法

Apacheで擬似静的を有効にする方法

步履不停
步履不停オリジナル
2019-06-29 11:43:497028ブラウズ

Apacheで擬似静的を有効にする方法

疑似静的 Apache を有効にする手順:

Apache の構成ファイル httpd.conf (パス: wamp\bin\apache\apache2) を開きます。 4.9\conf\httpd.conf

 #LoadModule rewrite_module modules/mod_rewrite.so

を見つけて、先頭の # を削除します。そうでない場合は追加しますが、Apache をサポートする mod_rewrite module

Find

<Directory "D:/ApacheServer/web">
    #
    # 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&#39;t give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks
 
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None
 
    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all
 
</Directory>

Apache をサポートする .htaccess ファイルを作成するには、AllowOverride None をAllowOverride All に置き換える専用の行である必要があります

Apache サーバーを再起動します

擬似静的を有効にする PHP プロジェクトのルート ディレクトリに .htaccess ファイルを作成します

Apache 関連の技術記事の詳細については、# を参照してください。 ##Apache チュートリアル 学ぶべきコラム!

以上がApacheで擬似静的を有効にする方法の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。