你到网上搜下伪静态,很多例子的
URL重写

解决方案 »

  1.   

    你把hello.php,替换成index.php
    在.htaccess文件里面写rewrite RewriteEngine on
    #RewriteBase   /
    #RewriteCond %{SCRIPT_FILENAME} !-f
    #RewriteCond %{REQUEST_URI} !^.*(\.css|\.js|\.gif|\.png|\.jpg|\.jpeg|\.class\.php)$
    #RewriteRule ^(.*)$ $1
    #RewriteRule !^index\.php$ index.php 
      

  2.   

    在项目根目录新建.htaccess文件内容如下:
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)/index.html$ index.php/$1 [QSA,L]
    </IfModule>