php apacheはどのように擬似静的を設定しますか?

1049 ワード

1.  Apache    mod_rewrite     php   phpinfo()        ,  Ctrl+F   “Loaded Modules”,       apache2handler       ,      “mod_rewrite”,     ,        。
        “mod_rewrite”,        apache    “/apache/conf/”    httpd.conf   ,  Ctrl+F   “LoadModule rewrite_module”,    ”#”     。
         ,  “LoadModule”   ,       “LoadModule rewrite_module modules/mod_rewrite.so”(      ),    apache     。

2. apache     .htaccess
    httpd.conf  

  Options FollowSymLinks
  AllowOverride None
    
  Options FollowSymLinks
  AllowOverride All

    :            ,          (              ),         ,   DocumentRoot                            D:/web/www.myweb.com       DocumentRoot "D:/web/www.myweb.com"           

             apache       

3.  .htaccess   
     htaccess.txt
         ,    –   ,        ”.htaccess”,      。             

4.          (           )

  <IfModule mod_rewrite.c>

   RewriteEngine on

   RewriteRule index.html$ index.php
   RewriteRule index-([1-9]+[0-9]*).html$ index.php?p=$1

  </IfModule>