>  기사  >  운영 및 유지보수  >  Apache에서 의사 정적을 활성화하는 방법

Apache에서 의사 정적을 활성화하는 방법

步履不停
步履不停원래의
2019-06-29 11:43:497028검색

Apache에서 의사 정적을 활성화하는 방법

의사 정적 아파치를 활성화하는 단계:

아파치의 구성 파일 httpd.conf를 엽니다. 경로: wampbinapacheapache2.4.9confhttpd.conf

찾기

 #LoadModule rewrite_module modules/mod_rewrite.so

앞의 #을 제거하세요. 그렇지 않은 경우 추가하되 Apache 지원 mod_rewrite 모듈을 만들기 위한 전용 라인이어야 합니다.

찾아

<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>

AllowOverride None을 AllowOverride All로 교체하여 Apache 지원 .htaccess 파일을 만듭니다.

아파치 서버를 다시 시작합니다.

루트에서 의사 정적을 활성화하려는 PHP 프로젝트 디렉토리에 .htaccess 파일을 생성합니다.

Apache와 관련된 더 많은 기술 기사를 보려면 Apache Tutorial 칼럼을 방문하여 알아보세요!

위 내용은 Apache에서 의사 정적을 활성화하는 방법의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.